-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavBar.js
More file actions
58 lines (56 loc) · 1.65 KB
/
Copy pathnavBar.js
File metadata and controls
58 lines (56 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* @ngdoc directive
* @name ionNavBar
* @module ionic
* @delegate ionic.service:$ionicNavBarDelegate
* @restrict E
*
* @description
* If we have an {@link ionic.directive:ionNavView} directive, we can also create an
* `<ion-nav-bar>`, which will create a topbar that updates as the application state changes.
*
* We can add a back button by putting an {@link ionic.directive:ionNavBackButton} inside.
*
* We can add buttons depending on the currently visible view using
* {@link ionic.directive:ionNavButtons}.
*
* Note that the ion-nav-bar element will only work correctly if your content has an
* ionView around it.
*
* @usage
*
* ```html
* <body ng-app="starter">
* <!-- The nav bar that will be updated as we navigate -->
* <ion-nav-bar class="bar-positive">
* </ion-nav-bar>
*
* <!-- where the initial view template will be rendered -->
* <ion-nav-view>
* <ion-view>
* <ion-content>Hello!</ion-content>
* </ion-view>
* </ion-nav-view>
* </body>
* ```
*
* @param {string=} delegate-handle The handle used to identify this navBar
* with {@link ionic.service:$ionicNavBarDelegate}.
* @param align-title {string=} Where to align the title of the navbar.
* Available: 'left', 'right', 'center'. Defaults to 'center'.
* @param {boolean=} no-tap-scroll By default, the navbar will scroll the content
* to the top when tapped. Set no-tap-scroll to true to disable this behavior.
*
* </table><br/>
*/
IonicModule
.directive('ionNavBar', function() {
return {
restrict: 'E',
controller: '$ionicNavBar',
scope: true,
link: function($scope, $element, $attr, ctrl) {
ctrl.init();
}
};
});