Last active
December 29, 2015 01:09
-
-
Save tbranyen/7590559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function(require, exports, module) { | |
'use strict'; | |
var Ember = require('ember'); | |
var App = Ember.Application.create({ | |
rootElement: 'main', | |
Router: require('router') | |
}); | |
// Defer readiness as we are using RequireJS and we want to ensure everything | |
// has been properly loaded, before initializing. | |
App.deferReadiness(); | |
module.exports = App; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(['config'], function() { | |
require([ | |
'app', | |
'application/index', | |
'user/index' | |
], function(App) { | |
App.advanceReadiness(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function(require, exports, module) { | |
'use strict'; | |
var Ember = require('ember'); | |
var Router = Ember.Router.extend({ | |
location: 'history' | |
}); | |
Router.map(function() { | |
this.resource('user', function() { | |
this.resource('user.edit', { path: '/:user_id' }); | |
this.route('new'); | |
}); | |
this.resource('user.print', { path: '/user/:user_id/print' }); | |
}); | |
module.exports = Router; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment