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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -