我对编程很新。我只是在尝试为应用程序菜单上的导航选项卡创建正确的代码时遇到问题。我已经尝试了几个小时来弄清楚编码中的错误,只需导航到选项卡
app.js
.state('tab.list', {
url: '/list',
views: {
'tab-list': {
templateUrl: 'templates/timeline/tab-list.html',
controller: 'ListCtrl',
}
}
})
制表list.html
<ion-view view-title="List">
<ion-content>
<ion-list>
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="chat in chats" type="item-text-wrap" href="#/tab/chats/{{chat.id}}">
<img ng-src="{{chat.face}}">
<i class="icon ion-chevron-right icon-accessory"></i>
<ion-option-button class="button-assertive" ng-click="remove(chat)">
<p class="padding center" style="margin: 20px 0px">
To test how thi
</p>
</ion-option-button>
</ion-item>
</ion-list>
</ion-content>
</ion-view>
Tabs.html
<ion-tab title="List" icon-off="ion-ios-people-outline" icon-on="ion-ios-play" href="#/tab/list">
<ion-nav-view name="tab-list"></ion-nav-view>
</ion-tab>
控制器-list.js
.controller('ListCtrl', function($scope, ListCtrl) {
});