2015-02-06 51 views
0

当我在控制器中设置$window.location.assign('#/someurl');我可以看到哈希标签更改,但它不加载。

.when("/signin", { 
     templateUrl: templateSource+"/signin", 
     controller: function($scope, $location, $window){ 
       $window.location.assign('#/checkout/billing'); 
     } 
}) 
+0

你能不能用'$ location.path()'? – Ronnie 2015-02-06 00:12:50

+0

或使用'window',而不是'$ window' – Ronnie 2015-02-06 00:15:06

回答

0

使用window,不$window或使用$location.path('#/checkout/billing');

.when("/signin", { 
    templateUrl: templateSource+"/signin", 
    controller: function($scope, $location){ 
     $location.path('#/checkout/billing'); 
    } 
}) 
+0

它看起来像路径将字符设置为:%23%2Fcheckout%2Fbilling – 2015-02-07 00:04:34