Skip to content

Instantly share code, notes, and snippets.

@tbranyen
Last active December 29, 2015 01:09
Show Gist options
  • Save tbranyen/7590559 to your computer and use it in GitHub Desktop.
Save tbranyen/7590559 to your computer and use it in GitHub Desktop.
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;
});
require(['config'], function() {
require([
'app',
'application/index',
'user/index'
], function(App) {
App.advanceReadiness();
});
});
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