I have a state that can have a variable height (depending on the content). I want to set that height as a css attribute for my background-color.
But I'm having trouble getting the correct height because the code fires before the content is loaded in the state.
I have this state,
$stateProvider
.state('home.suggestions', {
url: '',
views: {
"suggestions": {
templateUrl: '../assets/angular-app/templates/_suggestions.html',
controller: function(){
showHeight = $('.suggestions-container-wrapper').outerHeight();
console.log(showHeight)
}
},
},
})
But it always returns 175 (the height of the element before it loads the ng-repeat
content.
How do I run the code after the all the calls are done?