john john - 1 year ago 197
HTML Question

Anchor tag not working with Angular UI-Router

I am new to AngularJS. I want to pass a parameter through anchor tags in the following

code of AngularJS, but it is not working. What is the proper way to send a parameter via anchor link in

<a ui-sref="Type/valid">Valid Email</a>
<a ui-sref="Type/invalid">Invalid Email</a>

app.config(function($stateProvider, $urlRouterProvider){
$stateProvider.state("Type", {
templateUrl: "valid.php"

Answer Source

With ui-sref you can specify arguments like that

<a ui-sref="Type({ type: 'valid' })">Valid Email</a>
<a ui-sref="Type({ type: 'invalid' })">Invalid Email</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download