如何在路由中设置templateUrl的相对路径?

时间:2017-06-11 23:19:12

标签: angularjs angular-ui-router

我有路线规则:

.when('/filter-nodes', {
          controller: 'FilterNodesCtrl',
          templateUrl: 'views/filter-nodes.html'
        })

如何设置路径templateUrl相对?有时在某些页面中它不起作用:

  

无法加载资源:服务器响应状态为404(未找到)   angular.js:13642错误:[$ compile:tpload]无法加载模板:views / filter-nodes.html(HTTP状态:404未找到)

0 个答案:

没有答案
相关问题