-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathController.js
40 lines (30 loc) · 1.1 KB
/
Controller.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
define( function( require ) {
var Marionette = require( 'marionette' ),
DefaultView = require( 'module/BlueTheme/View/Default' ),
KindOfBlueView = require( 'module/BlueTheme/View/KindOf' );
return Marionette.Controller.extend( {
/**
* @property {Marionette.Application} appInstance
*/
appInstance: undefined,
initialize: function() {
// An example of giving the class an instance of the
// instantiated application
this.appInstance = require( 'AppInstance' );
},
/**
* default page for the blue module.
*/
defaultBlue: function() {
var defaultView = new DefaultView();
this.appInstance.regionMain.show( defaultView );
},
/**
* Page to demonstrate intramodule navigation
*/
kindOfBlue: function() {
var kindOfBlueView = new KindOfBlueView();
this.appInstance.regionMain.show( kindOfBlueView );
}
} );
} );