简体   繁体   中英

How to skip ui-router's ui-view and redirect partial url without .html extension in AngularJS

On trying to navigate from Home page using the below, it redirects me to a page with .html extension.

<a href="playplug.html"></a>

/example.com/playplug.html

How to actually skip using the .html extension in URL for the partial template as shown below with/without using ui-view , cos, I want to navigate to a separate HTML page and no need to display the partial template inside home_page (example.com) .

/example.com/playplug

Normally, the ui-router's ui-view let me display the partial template inside the main page; Is there something like this to override ui-router's ui-view or any other tweak... am new to AngularJS

<a href="playplug.html" url="/playplug"></a>

All you can do is just put the full URL. That works most of the times.

See example here: https://github.com/reflexdemon/ng-gulp/blob/master/src/app/home/home.html#L4

See Demo here: http://demo-venkatvp.rhcloud.com/#/home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM