Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs meteor angular用户界面。路由器行为奇怪_Angularjs_Meteor_Angular Ui Router - Fatal编程技术网

Angularjs meteor angular用户界面。路由器行为奇怪

Angularjs meteor angular用户界面。路由器行为奇怪,angularjs,meteor,angular-ui-router,Angularjs,Meteor,Angular Ui Router,我正在学习angular 1的meteor angular教程,我对routes.js文件有一些问题。出于某种原因,这会适当地显示我的文件,但当我从templateUrl(client/parties/views/parties list.html)的根目录添加适当的路径时,不会显示该文件。有人能帮我理解为什么会这样吗。所有文档都说templateUrl路径是绝对路径。谢谢 client/routes.js client/parties/views/parties-list.html 名称 描

我正在学习angular 1的meteor angular教程,我对routes.js文件有一些问题。出于某种原因,这会适当地显示我的文件,但当我从templateUrl(client/parties/views/parties list.html)的根目录添加适当的路径时,不会显示该文件。有人能帮我理解为什么会这样吗。所有文档都说templateUrl路径是绝对路径。谢谢

client/routes.js

client/parties/views/parties-list.html


名称
描述
添加
全部删除
  • {{party.description}

    X
client/parties/views/parties-list.html

我将以下代码行从更改为:

<button ng-click="parties.push(newParty)">Add</button>
添加

添加
这条路变得绝对。。。这与绕过控制器并直接访问使路径成为绝对路径的mongo集合有关。不过,我不知道为什么会这样

client/parties/views/parties-list.html

我将以下代码行从更改为:

<button ng-click="parties.push(newParty)">Add</button>
添加

添加

这条路变得绝对。。。这与绕过控制器并直接访问使路径成为绝对路径的mongo集合有关。不知道为什么会这样。

模板文件有404错误吗?如果是这样的话,这应该告诉你Pathey Phil有什么问题。404错误为负。这是一个奇怪的问题。我试着重新启动服务器,甚至重新启动计算机。出于某种原因,router.js只路由到包含parties-list.html文件的初始路径。尽管如此,我已经将该文件移动到public/parties/views目录。模板文件有404错误吗?如果是这样的话,这应该告诉你Pathey Phil有什么问题。404错误为负。这是一个奇怪的问题。我试着重新启动服务器,甚至重新启动计算机。出于某种原因,router.js只路由到包含parties-list.html文件的初始路径。不过,我已将该文件移到public/parties/views目录中。
<button ng-click="parties.push(newParty)">Add</button>
<button ng-click="parties.save(newParty)">Add</button>