在标签和视图之间导航 - 角度

时间:2016-04-07 18:23:08

标签: javascript angularjs ionic-framework

我对编程很新。我只是在尝试为应用程序菜单上的导航选项卡创建正确的代码时遇到问题。我已经尝试了几个小时来弄清楚编码中的错误,只需导航到选项卡

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) {
   });

0 个答案:

没有答案