官术网_书友最值得收藏!

Navigation and back menus

Ionic Framework has strong navigation support in the form of various directives such as ionNavView, ionView, ionNavBar, and so on. Ionic stores and maintains the navigation history in the mobile app. It dictates the transitions appropriately. An app section can have multiple views, which maintain separate navigation histories.

The UI Router module and states are an integral part of the design for the navigation concepts. The <ion-nav-view> directive has already been explained in the first section while defining the UI Router module.

<ion-view> is another directive that should be used as a container for the content of any view. It should have a <ion-content> directive and can have header and navbar information. It defines the title of the parent ionNavBar using the view-title attribute. There are other attributes such as cache-view to enable caching, hide-back-button to define whether the back button should be displayed or not, and hide-nav-bar attribute to define whether to hide the parent ionNavBar or not:

  • <ion-nav-bar> is another directive that is created along with the <ion-nav-view> directive and shows a top bar that will be modified as soon as the state changes. We can add a back button to be shown using a <ion-nav-back-button> directive. We can also add some custom buttons using the <ion-nav-buttons> directive.
  • <ion-nav-title> is a directive that can be used inside the <ion-nav-view> directive to override the title set in the navbar with any custom title or HTML content as a title.
主站蜘蛛池模板: 万盛区| 克拉玛依市| 类乌齐县| 兰坪| 贵港市| 台湾省| 搜索| 长春市| 桐柏县| 和田市| 高邑县| 呈贡县| 新沂市| 松原市| 启东市| 泰安市| 阿图什市| 天峨县| 施秉县| 阿瓦提县| 苏州市| 纳雍县| 太湖县| 轮台县| 嵩明县| 柳江县| 南丰县| 乌恰县| 德昌县| 嘉义市| 德兴市| 绥芬河市| 庆元县| 沐川县| 应城市| 中阳县| 大庆市| 湖州市| 凌云县| 城固县| 鄂州市|