我正在关注Pluralsight的教程以构建一个Web应用程序,并且我在连接team.html
和team-detail.html
时出错。 "ui-sref = "app.game({id: game.gameId}"
第4行的team-detail.html
做了什么?这是对的吗?
我的错误说:
TypeError: Cannot read property 'name' of undefined
at new TeamDetailCtrl (team-detail-ctrl.js:18)
at Object.invoke (ionic.bundle.js:11994)
at extend.instance (ionic.bundle.js:16247)
at ionic.bundle.js:15502
at forEach (ionic.bundle.js:8155)
at nodeLinkFn (ionic.bundle.js:15501)
at compositeLinkFn (ionic.bundle.js:14887)
at publicLinkFn (ionic.bundle.js:14766)
at self.appendViewElement (ionic.bundle.js:47324)
at Object.switcher.render (ionic.bundle.js:45864)ionic.bundle.js:19387 (anonymous function)
这是我在教程中途编写的代码的链接: https://github.com/bhaskar2khaneja/EliteScheduleApp/tree/master/www
另外,我不明白<.. href = "#/app/teams/{{team.id}}">
文件中standings.html
正在做什么。单击文件中的不同项目时,它不会产生我期望的输出。
以下是该应用使用的数据:http://elite-schedule.net/api/leaguedata/2009