[API] Begin moving out type

This commit is contained in:
Victor Woeltjen
2016-05-27 13:17:16 -07:00
parent 0c660238f2
commit a6996df3df
2 changed files with 19 additions and 12 deletions

19
tutorials/todo/todo.js Normal file
View File

@ -0,0 +1,19 @@
define(function () {
return function todoPlugin(mct) {
var todoType = new mct.Type({
metadata: {
label: "To-Do List",
glyph: "2",
description: "A list of things that need to be done."
},
initialize: function (model) {
model.tasks = [];
},
creatable: true
});
mct.type('example.todo', todoType);
return mct;
};
});