Making your own models - how to access the app object?

Skip to first unread message

Igor Zinovyev

Mar 1, 2014, 3:55:49 PM3/1/14
Hello, everyone!

Perhaps this has been asked already, but I can't find it anywhere. The question is: when I want to make my own model to be used with Locomotive, how do I achieve the similar behaviour to what happens with the Controller object? For instance:

var locomotive = require('locomotive');
var Controller = locomotive.Controller;
var SomeController = new Controller();

SomeController.index = function() {
// This is what I want to achieve with my custom models
  var app =;

Is there some way to add a model class to be recognized by Locomotive this way?

Reply all
Reply to author
0 new messages