简体   繁体   English

应用程序路由-不重定向到html页面

[英]app route - not redirecting to html page

This is a sample from MEAN stack website, I require the browser to point to a html file called ' findCable.html ' instead it keeps routing it to 'singleCable.html' The code snippet is from angular routing file, I've also checked the back-end route(s) any ideas what's going wrong ? 这是MEAN Stack网站上的示例,我需要浏览器指向一个名为“ findCable.html”的html文件,而不是将其始终路由到“ singleCable.html”。代码段来自角度路由文件,我也检查了后端路线任何想法出了什么问题?

Please see the attached images too _ TIA 请也查看附件中的图片_ TIA

   .when('/cable/search', {
        templateUrl: 'app/views/pages/cables/findCable.html',
        controller: 'cableController',
        controllerAs: 'cable'
    })

Screenshot of website code 网站代码的屏幕截图

This is simple routing mistake. 这是简单的路由错误。 Just keep your cable/search route above the cable/:cable_id route which is overriding your search keyword as cable_id 只需将cable/search路由保持在cable/:cable_id路由之上,该路由将覆盖您的search关键字,即cable_id

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

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