javascript - Controller methods do not call when opening link on a new tab -


in angular app have link when clicked navigated page .

<ul class="nav navbar-nav">                                          <li ng-class="{'current':iscurrent('/home')}">                                     <a href="#home" >home</a>                                  </li>                             </ul>   

it works fine , when open link on new tab right click . page loaded controller methods not getting loaded. not having idea why happening.

$routeprovider.when('/home', {         templateurl: 'views/home.html',         controller: 'dashboardcontroller dashboard'     }); 

controller

(function() { function dashboardcontroller($filter) {      this.retrievedata = function() {          // data retrieved server here     };      this.initpage = function() {         ctrl.retrievedata();     };          ctrl.initpage();  } angular.module('esg.controllers').controller('dashboardcontroller', ['$filter', dashboardcontroller]); 

})();


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -