Plz告诉我如何使用链接在角度js中显示其他页面我在下面的代码中使用但是它没有被打开
例如
<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 :(得分:1)
您可以使用$window.location.href = '/index.html';
$window
将成为您的控制器依赖项之一。
如果您想使用链接,将使用ng-href
<a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>