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
// app/intializers/application.js | |
/** | |
* Expose the Application object to all Routes, Controllers, and Services. | |
* This is a simple way to gain access to things like `application.verison`... | |
*/ | |
export function initialize(container, application) { | |
application.inject('route', 'application', 'application:main'); | |
application.inject('controller', 'application', 'application:main'); | |
application.inject('service', 'application', 'application:main'); | |
} |
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
// app/initializers/foo.js | |
var POJO = { | |
bar: 'this is your POJO' | |
// whatever you need here | |
// this can also be import from another file... | |
}; | |
export function initialize(container, application) { | |
application.register('pojo:main', POJO, { instantiate: false, singleton: true }); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
// components/split-view/component.js | |
actions: { | |
showUserPopover() { | |
// Ember.debug('showUserPopover action from split-view'); | |
// Getting error: `An action named 'showUserPopover' was not found in (generated classes controller).` | |
// got same result using closure action instead of `sendAction` | |
this.sendAction('showUserPopover'); | |
} | |
} |
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
Error: Assertion Failed: You must use Ember.set() to set the `currentState` property (of <app@component:ui/cell-assignment::ember1408>) to `[object Object]`. | |
at new Error (native) | |
at Error.EmberError (http://localhost:4200/assets/vendor.js:27314:21) | |
at Object._emberMetalCore.default.assert (http://localhost:4200/assets/vendor.js:16033:13) | |
at SETTER_FUNCTION [as currentState] (http://localhost:4200/assets/vendor.js:30817:34) | |
at _emberMetalMixin.Mixin.create._transitionTo (http://localhost:4200/assets/vendor.js:56379:44) | |
at Renderer.willDestroyElement (http://localhost:4200/assets/vendor.js:23700:12) | |
at Renderer.remove (http://localhost:4200/assets/vendor.js:23668:10) | |
at Object._emberMetalMerge.default.destroyElement (http://localhost:4200/assets/vendor.js:59776:21) | |
at Object._emberMetalMerge.default.cleanup (http://localhost:4200/assets/vendor.js:59768:25) |
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
import DS from 'ember-data'; | |
export default DS.RESTAdapter.extend({ | |
namespace: 'api', | |
pathForType(modelName) { | |
let dasherized = Ember.String.dasherize(modelName); | |
if (/^job-/.test(modelName)) { | |
dasherized = 'job'; |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
import move from 'ember-animated/motions/move'; | |
import adjustCSS from 'ember-animated/motions/adjust-css'; | |
import { fadeOut } from 'ember-animated/motions/opacity'; | |
import { easeOut, easeIn } from 'ember-animated/easings/cosine'; | |
const rollUp = function * ({ keptSprites, removedSprites, duration }) { | |
let [kept] = keptSprites; | |
for (let sprite of keptSprites) { | |
let z = removedSprites.length + 1; |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
import { adjustCSS } from 'ember-animated/motions/adjust-css'; | |
import move from 'ember-animated/motions/move'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
inset: false, | |
*transition({ insertedSprites, removedSprites }) { |