angularjs - IONIC Framework - template is getting reloaded 10-12 times & so the controller functions -


i have verified, controller getting loaded once not multiple times. also, if add more routes in app.js number of print keeps increasing well.

issue demo: http://codepen.io/anon/pen/xxxxpm (check console in browser)

.controller('authsignupctrl', function($scope, $state) {    var i=01;    $scope.test = function() {       console.log(i++);    }; });   $stateprovider     .state('login', {       url: '/login1',           templateurl: 'templates/login.html',           controller: 'authsignupctrl'     }); 

i don't think template being reloaded. think because bound function expression. try typing text box, cause digest loop cycle , fire function, resulting in more output in console.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -