Skip to content

Instantly share code, notes, and snippets.

@elis
Last active January 2, 2016 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elis/8297092 to your computer and use it in GitHub Desktop.
Save elis/8297092 to your computer and use it in GitHub Desktop.
export default Ember.Route.extend({
needs: ['bigquery', 'currentUser'],
model: function (params, transition) {
console.log('ttk model for queries?', params, transition.targetName);
var store = this.get('store'),
projectId = this.get('controllers.bigquery.activeProjectId');
var queries = store.find('query', {
projectId: params.project_id,
key: this.get('controllers.currentUser.activeToken.access_token')
});
queries.then(function(queries) {
console.log('Got queries from store:', queries);
});
return queries;
}
});
<h3>Recent Queries</h3>
Hello!
{{log 'model'}}
{{#each job in 'model'}}
{{job.query}} -
{{/each}}
{{#each job in model}}
{{job.query}} -
{{/each}}
{{#each 'model'}}
{{query}} -
{{/each}}
{{#each model}}
{{query}} -
{{/each}}
{{outlet}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment