title | description | category | sortBy |
---|---|---|---|
Classes |
The core classes exposed on Assemble's API
|
docs |
40 |
Exposed as static properties
All classes are exposed as static properties on both the assemble
constructor, and the assemble instance (app
). Thus, they can all be accessed as follows:
var assemble = require('assemble');
var Collection = assemble.Collection;
var Group = assemble.Group;
var Item = assemble.Item;
var List = assemble.List;
var View = assemble.View;
var Views = assemble.Views;
// or
var app = assemble();
var Collection = app.Collection;
var Group = app.Group;
var Item = app.Item;
var List = app.List;
var View = app.View;
var Views = app.Views;
Create an instance of assemble
with the given options
.
Example
var assemble = require('assemble');
var app = assemble();
Sugar for:
var Assemble = require('assemble');
var app = new Assemble();
Create an instance of Collection
with the given options
.
Example
var Collection = app.Collection;
var collection = new Collection();
Learn more about Collect.
Create an instance of Group
with the given options
.
Example
var Group = app.Group;
var group = new Group();
Learn more about Group.
Create an instance of Item
with the given options
.
Example
var Item = app.Item;
var item = new Item();
Learn more about Item.
Create an instance of List
with the given options
.
Example
var List = app.List;
var list = new List();
Learn more about List.
Create an instance of Views
with the given options
.
Example
var Views = app.Views;
var views = new Views();
Learn more about Views.
Create an instance of View
with the given options
.
Example
var View = app.View;
var view = new View();
Learn more about View.
Create an instance of Router
with the given options
.
Example
var Router = app.Router;
var router = new Router();
Learn more about Router.
Create an instance of Route
with the given options
.
Example
var Route = app.Route;
var route = new Route();
Learn more about Route.