This file contains hidden or 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
// inside application route | |
showPanel(panelName) { | |
if (!this.can('view panel of application', { panel: panelName })) { | |
return; | |
} | |
if (!panelName) { | |
return console.warn('Invalid panel toggled'); | |
} |
This file contains hidden or 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: Ember Data expected a number or string to represent the record(s) in the `role` relationship instead it found an object. If this is a polymorphic relationship please specify a `type` key. If this is an embedded relationship please include the `DS.EmbeddedRecordsMixin` and specify the `role` property in your serializer's attrs object. | |
at new Error (native) | |
at Error.EmberError (http://maldenma.localhost:3000/dashboard/assets/vendor.js:22059:21) | |
at Object.Ember.default.assert (http://maldenma.localhost:3000/dashboard/assets/vendor.js:15394:13) | |
at ember$data$lib$system$store$$deserializeRecordId (http://maldenma.localhost:3000/dashboard/assets/vendor.js:76334:15) | |
at http://maldenma.localhost:3000/dashboard/assets/vendor.js:76312:11 | |
at http://maldenma.localhost:3000/dashboard/assets/vendor.js:78222:20 | |
at Map.forEach.cb (http://maldenma.localhost:3000/dashboard/assets/vendor.js:23605:11) | |
at OrderedSet.forEach (http://maldenma.localhost:3000/dashboard/assets/v |
This file contains hidden or 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', | |
me: 'me', | |
actions: { | |
toggle() { | |
this.toggleProperty('currentUser'); | |
} |
This file contains hidden or 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
Preparing to transition from '' to ' index' ember.debug.js:28042 | |
Transitioned into 'index' constraints.js:81 | |
[liquid-fire] Checking transition rules for <div id="ember686" class="ember-view liquid-container">…</div> constraints.js:148 | |
[liquid-fire rule 6] rejected because parentElementClass was ember-view liquid-container constraints.js:148 | |
[liquid-fire rule 6] rejected because firstTime was yes constraints.js:81 | |
[liquid-fire] Checking transition rules for <div id="ember584" tabindex="1" class="ember-view application">…</div> constraints.js:148 | |
[liquid-fire rule 6] rejected because parentElementClass was ember-view application constraints.js:148 | |
[liquid-fire rule 6] rejected because firstTime was yes constraints.js:81 | |
[liquid-fire] Checking transition rules for <div id="ember584" tabindex="1" class="ember-view application">…</div> constraints.js:148 | |
[liquid-fire rule 6] rejected because parentElementClass was ember-view application constraints.js:148 |
This file contains hidden or 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.Component.extend({ | |
setup: on('didInsertElement', function () { | |
this.$().on('click', Ember.run.bind(this, function (event) { | |
console.log(event); | |
this.transitionToRoute('index'); | |
})); | |
}) | |
}); |
This file contains hidden or 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.Component.extend({ | |
positionalParams: ['routeName', 'model1', 'model2'] | |
}); |
This file contains hidden or 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
Preparing to transition from '' to ' index' | |
ember.debug.js:28042 Transitioned into 'index' | |
constraints.js:81 [liquid-fire] Checking transition rules for <div id="ember686" class="ember-view liquid-container">…</div> | |
constraints.js:193 [liquid-fire rule 1] rejected because of a constraint on oldRoute. oldRoute was | |
constraints.js:81 [liquid-fire] Checking transition rules for <div id="ember584" tabindex="1" class="ember-view application">…</div> | |
constraints.js:193 [liquid-fire rule 1] rejected because of a constraint on oldRoute. oldRoute was | |
constraints.js:81 [liquid-fire] Checking transition rules for <div id="ember584" tabindex="1" class="ember-view application">…</div> | |
constraints.js:193 [liquid-fire rule 1] rejected because of a constraint on oldRoute. oldRoute was | |
ember.debug.js:28042 Transitioned into 'index' | |
constraints.js:81 [liquid-fire] Checking transition rules for <div id="ember827" class="ember-view liquid-modal">…</div> |
This file contains hidden or 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 function downloadFile(inUrl, data, name) { | |
return new Ember.RSVP.Promise((resolve, reject) => { | |
let req = new XMLHttpRequest(); | |
let session = localStorage.getItem('ember_simple_auth:session'); | |
let token; | |
if (session) { | |
try { |
This file contains hidden or 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
selections: computed('selectionService.selected.length', 'selectionService.selected', { | |
get() { | |
var selected = this.get('selectionService.selected'); | |
return selected.mapBy('id'); | |
} | |
}) |
This file contains hidden or 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', | |
arr: Ember.A(), | |
actions: { | |
add() { | |
var arr = this.get('arr'); | |