Backbone Paginator Server Sorting

Recently I had to sort a collection using server mode (that is, doing a fetch for each page). It turns out this was not a simple as it seemed, needing to pass some extra options to the mode switching to stop the state being lost (as I could not set the pagination mode on the […]

Nested Marionette Behaviors

Today I was having trouble with Nested Behaviors in Marionette 2.4.2. The trouble was, how do I get options into my behaviors in behaviors? Here is my situation: view.js: View.Main = Marionette.ItemView.extend({ … behaviors: { // named so the sub behavior can access this! behaviorName: { data: ‘someData’, behaviorClass: BehaviorName, } } … }); Then […]

Publishing a Yeoman generator and its sub generators.

So I have a Yeoman generator that helps scaffold a Backbone.Marionette application using the module paradigm, which is all good. Though I did get a little caught out when publishing the sub-generator component of it. That is so you can do things like yo marionette-modules:module aSubModule, to get a module generated. The :module part was […]