Created
January 18, 2018 06:55
-
-
Save nathanclark/80b1d0bc393b2d644ab0e3e184a5de43 to your computer and use it in GitHub Desktop.
aritists video details
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 videos = this.store.query('artist', {"artist_id":artist_id , "videos": params.guid }) | |
.then(function (a) { | |
// How to I pass the guid into the function? | |
console.log(params.guid) // params.guid == undefined because it is out f scope. | |
// | |
var video = a.get("firstObject").get('videos') | |
return video; | |
}); | |
return videos; | |
} | |
}); |
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; | |
} | |
}); |
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
{ | |
"version": "0.13.0", | |
"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.16.2", | |
"ember-template-compiler": "2.16.2", | |
"ember-testing": "2.16.2" | |
}, | |
"addons": { | |
"ember-data": "2.16.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment