angularjs - ng-include loading partial partial only once -


ng-include driving me nuts , hope can help. have html code on master page

<div id="subviewpartial"> <ng-include class="col-md-8 col-md-offset-2" src="currentpartial"> </ng-include> </div>

and in angularjs have following functions

$scope.createunit = function (link) {         $rootscope.action = 0;         $rootscope.id = 0;          $scope.currentpartial = window.location.origin + link;         settimeout(subviewservice.showsubview(), 500);     };  $scope.createuser = function (link) {         //////console.log(link);         $scope.currentpartial = window.location.origin + link;         settimeout(subviewservice.showsubview(), 500);     }; 

now, if fire createuser once, , execute createunit serveral times, subview rotate between createuser , createunit though not calling createuser.

here subviewservice well

baapp.service('subviewservice', function () { this.showsubview = function () {     var subviewcontent = '#subviewpartial';      $.subview({         content: subviewcontent,         onshow: function () {         },         onclose: function () {             $.hidesubview();         },         onhide: function () {         }     }); } 

});

i hope clear in explaining problem. idea going on?

what should take @ createunit() , createuser() functions called. instance setting console.debug() statements or debugger statement in methods.

you mention part of separate controllers, mean functions called during initialization of said controllers?

if case, (accidentally) creating controller calls createuser() more think, possibly because of ng-include, ng-if or ng-switch constructions.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -