我已经验证了所有 JSON 对象,并且它们已成功添加到 VoteCtrl 的 $scope(见右图)。据我所知,我的表达式应该从我的 JSON 模型中选择所需的数据。所以我的问题是,为什么这不起作用&我在这里缺少什么?
<!-- National -->
<li ng-repeat="nationalHeader in votingTopics" class="nav-header">
{{nationalHeader[0].name}}
</li>
<li ng-repeat="nationalTopic in votingTopics" class="active">
<a href="{{nationalTopic.National.topicLink}}">
{{nationalTopic.National.topicTitle}}
</a>
</li>
<!-- State -->
<li ng-repeat="stateHeader in votingTopics" class="nav-header">
{{stateHeader[0]}}
</li>
<li ng-repeat="stateTopic in votingTopics">
<a href="{{stateTopic.State.California.topicLink}}">
{{stateTopic.State.California.topicTitle}}
</a>
</li>
<!-- City -->
<li ng-repeat="cityHeader in votingTopics" class="nav-header">
{{cityHeader[0]}}
</li>
<li ng-repeat="cityTopic in votingTopics">
<a href="{{cityTopic.State.California.Sacramento.City.topicLink}}">
{{cityTopic.State.California.Sacramento.City.topicTitle}}
</a>
</li>
<!-- County -->
<li ng-repeat="countyHeader in votingTopics" class="nav-header">
{{countyHeader[0]}}
</li>
<li ng-repeat="countyTopic in votingTopics">
<a href="{{countyTopic.County.topicLink}}">
{{countyTopic.County.topicTitle}}
</a>
</li>`