0

Plz tell me how to use link to appear other page in angular js I have used below code but it is not being opened

eg.

<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>
1
  • are you using any routing? Commented Oct 9, 2015 at 11:42

1 Answer 1

1

You can use $window.location.href = '/index.html';

Where $window will be one of your controller dependency.

If you want to use link, ng-href will be used

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

Refer: https://docs.angularjs.org/api/ng/directive/ngHref

Sign up to request clarification or add additional context in comments.

2 Comments

but I m using linux os(ubantu)
So, what is the problem, that will work on all the OS platform.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.