Created
January 18, 2018 06:57
-
-
Save nathanclark/d8194df3d024d019f4e0fd15ed3efc35 to your computer and use it in GitHub Desktop.
video.js
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 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