kendo ui - How to navigate programatically with AngularJS and KendoUI -
i have kendo ui mobile app angularjs. first view login view.
<body id="body" kendo-mobile-application k-hash-bang="true"> <kendo-mobile-layout k-id="'default'"> <kendo-mobile-view id="login" k-layout="'default'" ng-controller="logincontroller" k-on-show="init()"> ...
after successful login want redirect specific view:
<kendo-mobile-view id="portfolio" k-layout="'default'" ng-controller="portfoliocontroller" k-on-show="init()"> function redirectafterlogin() { var app = new kendo.mobile.application(document.body); app.navigate("#!portfolio"); }; function redirecttologin() { var app = new kendo.mobile.application(document.body); app.navigate("#!login"); };
it works when call redirectafterlogin()
debugger hits logincontroller init() method , portfoliocontroller init() 2 times.
you can try using $location.path
in applications, went through similar situation, when kendo
or window
navigation functions caused loops in controllers.
Comments
Post a Comment