Skip to content

Instantly share code, notes, and snippets.

@nathanclark
Created January 18, 2018 06:57
Show Gist options
  • Save nathanclark/d8194df3d024d019f4e0fd15ed3efc35 to your computer and use it in GitHub Desktop.
Save nathanclark/d8194df3d024d019f4e0fd15ed3efc35 to your computer and use it in GitHub Desktop.
video.js
import Route from '@ember/routing/route';
export default Route.extend({
model: function(params,transition) {
let artist_id = transition.params["artists.show"].id;
var video = this.store.query('artist', {"artist_id":artist_id , "video": params.guid })
.then(function (asset) {
// How to I pass the guid into the function?
console.log(params.guid) // params.guid == undefined because it is out f scope.
//
var video = asset.get("firstObject").get('videos')
return video;
});
return video;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment