Javascript 我在Ionic框架中链接两个页面时遇到问题

Javascript 我在Ionic框架中链接两个页面时遇到问题,javascript,html,angular-ui-router,ionic-framework,Javascript,Html,Angular Ui Router,Ionic Framework,我正在按照Pluralsight上的教程构建web应用程序,在连接team.html和team detail.html时出现错误。在team detail.html的第4行“ui sref=”app.game({id:game.gameId}“做了什么?正确吗? 我的错误是: TypeError: Cannot read property 'name' of undefined at new TeamDetailCtrl (team-detail-ctrl.js:18) at Objec

我正在按照Pluralsight上的教程构建web应用程序,在连接
team.html
team detail.html
时出现错误。在
team detail.html
的第4行
“ui sref=”app.game({id:game.gameId}“
做了什么?正确吗? 我的错误是:

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)
这里有一个链接,指向我在本教程中学习到的代码:

另外,我不明白
standings.html
文件中做了什么。它没有产生我在文件中单击不同项目时所期望的输出


以下是应用程序正在使用的数据:

vm.teamName=team.name
失败,因为
team
未定义。也就是说,
var team=\uuuu.chain(data.teams)…
没有给你期望的值。我会看看。为什么团队没有定义?教程没有详细描述underline.js中的方法,我是初学者,所以我不能真正理解。可能有几件事…is
vm.teamId=Number($stateParams.id)
正确地将
vm.teamId
设置为一个数字?您也创建了factory吗?我不确定,但这正是教程中的人员正在使用的,并且工作正常。