我是Angularjs的新手,只是路由..我已经按照本文的教程进行了操作.. https://scotch.io/tutorials/single-page-apps-with-angularjs-routing-and-templating
我也读过ng-book,他们似乎都教我实现角度路径模块的相同程序..
但我似乎得到了以下错误..我还包括堆栈
我尝试用不同的方式重写我的代码,比如不将myApp模块放在变量中,而是用相同的angular.module()重新声明它。语法..我还删除每个函数/对象,以查看错误被抛出的位置,它似乎在ngRoute模块中
RangeError: Maximum call stack size exceeded
at <error>
at $get (https://simplysocial.firebaseapp.com/vendor.js:9101:18)
at invokeLinkFn (https://simplysocial.firebaseapp.com/vendor.js:8644:9)
at nodeLinkFn (https://simplysocial.firebaseapp.com/vendor.js:8142:11)
at compositeLinkFn (https://simplysocial.firebaseapp.com/vendor.js:7534:13)
at compositeLinkFn (https://simplysocial.firebaseapp.com/vendor.js:7538:13)
at publicLinkFn (https://simplysocial.firebaseapp.com/vendor.js:7409:30)
at link (https://simplysocial.firebaseapp.com/vendor.js:29279:7)
at invokeLinkFn (https://simplysocial.firebaseapp.com/vendor.js:8642:9)
at nodeLinkFn (https://simplysocial.firebaseapp.com/vendor.js:8142:11)(anonymous function) @ vendor.js:12314$get @ vendor.js:9101invokeLinkFn @ vendor.js:8644nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534publicLinkFn @ vendor.js:7409$get.boundTranscludeFn @ vendor.js:7553controllersBoundTransclude @ vendor.js:8169update @ vendor.js:29229link @ vendor.js:29194invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142compositeLinkFn @ vendor.js:7534compositeLinkFn @ vendor.js:7538publicLinkFn @ vendor.js:7409link @ vendor.js:29279invokeLinkFn @ vendor.js:8642nodeLinkFn @ vendor.js:8142
这里也是我的代码
var simplySocialApp = angular.module('simplySocialApp', ['ngRoute']);
simplySocialApp.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/home.html'
});
}]);
谢谢
答案 0 :(得分:0)
@pankajparkar香港专业教育学院我也尝试过..香港专业教育学院发现问题..我的内置不包括我在视图目录中的模板..它只是转储index.html文件..当我包括其他模板到我的内置..它工作原理应该......:-D在旁注:emberjs模板的工作方式不同于angularjs ..我必须使用emberjs内置..: - )