john john - 7 months ago 95
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"


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>