angularjs - ui-router controller instantiated again on ui-sref -
i've state link state b. state a's controller contains method declarations , calls on $scope. like:
controller : function($scope) { $scope.myfunc = { ... } $scope.myfunc(); }
when going state b, function $scope.myfunc() called again. why , how avoid? thanks.
update state contains inner $state.go notify , reload set false update parameters. if remove this, transition ok...why?
jsfiddle fiddle: https://jsfiddle.net/p2qnrfsm/
Comments
Post a Comment