ui-router - $state.go() not working

前端 未结 2 1951
渐次进展
渐次进展 2021-01-13 07:28

Here is the app.js of my project:

(function () {
\'use strict\';

angular
    .module(\'app\', [\'ui.router\', \'ngCookies\', \'angular-inview\', \'ngMateria         


        
2条回答
  •  甜味超标
    2021-01-13 08:04

    Well, thanks to @Vanojx1, I found out adding e.preventDefault(); before the $state.go('login'); made it work. Still dont understand why though.

提交回复
热议问题