angularjs - angularUI duplicates my function -


Hi friends, I have a strange problem with my Conanial App. I'm trying to use the Bootstrap UI model , But every time I use it, my app duplicates. I can not belt the project because it is too big, but I will try to explain it better with the example.

Code for Model:

  & lt; Div ng -controller = "modalCtrl" & gt; & Lt; Script type = "text / ng-template" id = "login.html" & gt; & Lt; Div class = "modal-header" & gt; & Lt; H3 & gt; Benvenuto & lt; / H3 & gt; & Lt; / Div & gt; & Lt; Div class = "modal-body" & gt; & Lt; Form ng-submit = "login ()" & gt; & Lt; Input id = "focused input" class = "form-control" type = "text" ng-model = "data user name" placeholder = "user name" popover = "popup-trigger =" focus "popover-placement =" Right ">  
Input class =" BTN-Primary BTN-LG "type =" Submit " Value = "law

This is my modal view:

  BIappCtrl.controller ('modalCtrl', function ($ scope, $ modal) {var open = function () {Var modalInstance = $ modal.open ({templateUrl: 'login.html', Administrator: this .loginCtrl});}; open ();});  

And this is the controller, it is technically cured, my app model makes it, but it does twice , To make a model on each other, so I'll close once and find each other down on it. This strange thing still works for a while, when I try to use the U-root, rather the Nargate module, do you have any ideas?

OK I have solved the problem and I will write the solution, even if it is simple. The mistake was mine, I have mistakenly understood the NGRUTT module, so in my app js file I have inserted the controller for every scene, even if it is written in the devver in the device. Mistake here:

  BIapp.config (['$ routeProvider', function ($ route provider) {$ routeProvider. When ('/ menu', {templateUrl: 'views / menu.html' ( '/ Search', {templateUrl: '', 'Controller:' menu.ctrl '}). When (' / modal ', {templateUrl:' views / modal.html ', // controller:' modalCtrl '}). When / ('/ logout /' search.html ', // Controller:' searchCtrl '} when / (' / varie ', {templateUrl:' views / varie.html ', // controller:' varieCtrl '}). ). ', {TemplateUrl:' views / logout.html ', // Controller:' logoutCtrl '}). Otherwise ({redirectTo:' / menu '});}]);  

Comments