javascript - Value of variable not reflecting ng-view -


i have div shows highchart based on ng-view. -

<div ng-show="series" ng-controller="somecontroller"     <highchart config="someconfig" class="span9"></highchart> </div> 

series variable in $scope. when page loads first time, series null/undefined (falsy) on click of button, data fetched , put in series variable (truthy). change of state of series variable not automatically picked ng-view , chart not shown. have tried things calling function in ng-view returns $scope.series it's not working. please not highchart working fine since if move out of above div, chart shows fine.

what doing wrong? there way ng-view automatically gets notified of changes in $scope.series , shows div?

thanking in anticipation.

assuming using ng-view, declare controller in $route service, don't need use ng-controller directive within view again:

<div ng-show="series">     ... </div> 

this cause controller attached , executed twice , might root of problem.

also, might question typo, forgot > in example html tag


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -