2015-10-09 47 views
0

PLZ告诉我如何使用链接出现其他页面的角度JS我用下面的代码,但它没有被打开打开一个网页到其他页面angularjs

如。

<form role="form" ng-submit="resetPassword()"> 
    <div class="form-group"> 
     <input type="password" class="form-control input-lg" id="username" ng-model="credential.password" placeholder="Password"> 
    </div> 
    <div class="form-group"> 
     <input type="password" class="form-control input-lg" id="password" ng-model="confirmPassword" placeholder="Confirm Password"> 
    </div> 
    <button type="submit" class="btn btn-lg btn-primary btn-block">Submit</button> 

    <div class="form-group m-top15"> <a href="#/index.html">Sign in</a> </div> 
</form> 
+0

您使用的任何路由:

如果你想使用的链接,NG-的href将参考使用

<a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a> 

? –

回答

1

您可以使用$window.location.href = '/index.html';

$window将是你的控制器依赖性的一个。 https://docs.angularjs.org/api/ng/directive/ngHref

+0

但我使用Linux操作系统(ubantu) –

+1

那么,什么是问题,这将适用于所有的操作系​​统平台。 –

相关问题