You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2019. It is now read-only.
I'm unable to first get post data with a promise and then add this data to the metaTags object. It seems metaTags doesn't wait for a promise to resolve.
So this code will give undefined for portfolioItem.
@johnjspiteri Sorry for my extremely late response. I don't have the time to look at this problem unfortunaltly. Thank you for your response. Hopefully I will have some time later this year.
I got the exact same thing, When having a resolve that returns a promise, metatags does not wait for it and instead gives you the raw, un-invoked reference
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm unable to first get post data with a promise and then add this data to the metaTags object. It seems metaTags doesn't wait for a promise to resolve.
So this code will give undefined for portfolioItem.
.state('portfolioDetail', { url: '/portfolio/:slug', controller: 'PortfolioDetailController as portfolioDetail', templateUrl: 'templates/portfolio-detail.html', resolve: { /* @ngInject */ portfolioItem: function(PageService, $stateParams) { PageService.getPortfolioDetail($stateParams.slug) .then(function(response) { return response[0]; }); } }, metaTags: { /* @ngInject */ title: function(portfolioItem) { return portfolioItem; } } })
Am I missing something? Thanks in advance!
The text was updated successfully, but these errors were encountered: