Last active
April 13, 2016 09:59
-
-
Save mapohjola/1caead1325799a059d8954ae110f2043 to your computer and use it in GitHub Desktop.
New 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'; | |
export default Ember.Controller.extend({ | |
init() { | |
// loop through loaded info and set query params | |
this.set('queryParams', ["name"]); | |
this._super(...arguments); | |
}, | |
//queryParams: ["name"], | |
/*queryParams: Ember.computed(function(){ | |
return new Ember.RSVP.Promise(function(resolve,reject){ | |
Ember.run.later(this, function() { | |
return ["name"] | |
}, 2000); | |
}) | |
}),*/ | |
name: null, | |
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'; | |
export default Ember.Route.extend({ | |
queryParams: { | |
other: { | |
refreshModel: true | |
} | |
}, | |
model(params) { | |
// actually load what query params should be used async | |
let queryParams = { | |
name: { | |
refreshModel: true | |
} | |
} | |
this.set('queryParams', queryParams); | |
console.log(params); | |
return JSON.stringify(params); | |
}, | |
}); |
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
{ | |
"version": "0.7.2", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.4.4", | |
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js", | |
"ember-template-compiler": "2.4.4" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment