Skip to content

UI Route Exercise

Kosala Nuwan Perera edited this page Feb 20, 2017 · 1 revision

Using Angular UI-Router

With VS Code on Windows PC

  • Run ionic start ionic-ui-routing tab to create a new ionic project
  • Run ionic serve --lab to ensure it works
  • Change the href attribute in tabs.html to use state instead
<ion-tab title="Status" icon-off="ion-ios-pulse" icon-on="ion-ios-pulse-strong" ui-sref="tab.dash">
<ion-tab title="Chats" icon-off="ion-ios-chatboxes-outline" icon-on="ion-ios-chatboxes" ui-sref="tab.chats">
<ion-tab title="Account" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear" ui-sref="tab.account">
  • Pass parameters as object literals instead in the tab-chats.html
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="chat in chats" type="item-text-wrap" ui-sref="tab.chat-detail({ chatId: chat.id })">
  • Run ionic serve --lab to run the app on the browser to test if everything works

Exercises

Contributing

Documentation

  • API
  • Portal
  • 3rd-party integrations
Clone this wiki locally