How to declare, assign and call url from .state in app.js

Hi,

How to declare, assign and call url from .state in app.js?

For example : url:/sample

url is sample but where i declare this sample that is url

any body can explain this.

Thanks in Advance,

I’m not quite sure I understand the question, but I would actually suggest not trying to navigate by URL. Instead, I’d navigate by state and ui-sref.

Sample in a controller:

$state.go('state1');

Sample in HTML:

<a ui-sref="state1">Go To State 1</a>