简体   繁体   English

如何在AngularJS中跳过ui-router的ui-view并重定向不带.html扩展名的部分URL

[英]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. 在尝试使用下面的主页导航时,它会将我重定向到扩展名为.html的页面。

<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) . 如何实际跳过在部分模板的URL中使用.html扩展名,如下所示,使用/不使用ui-viewcos,我想导航到单独的HTML页面,而不需要在home_page中显示部分模板(例如。 com)

/example.com/playplug

Normally, the ui-router's ui-view let me display the partial template inside the main page; 通常,ui-router的ui-view让我在主页面内显示部分模板; Is there something like this to override ui-router's ui-view or any other tweak... am new to AngularJS 是否有这样的东西来覆盖ui-router的ui-view或任何其他调整......是AngularJS的新手

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

All you can do is just put the full URL. 您所能做的只是填写完整的URL。 That works most of the times. 大部分时间都有效。

See example here: https://github.com/reflexdemon/ng-gulp/blob/master/src/app/home/home.html#L4 请参见此处的示例: https//github.com/reflexdemon/ng-gulp/blob/master/src/app/home/home.html#L4

See Demo here: http://demo-venkatvp.rhcloud.com/#/home 请参阅此处的演示: http//demo-venkatvp.rhcloud.com/#/home

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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