From 0b65d379ee86879c61fa848cbd412555e5eac455 Mon Sep 17 00:00:00 2001 From: Andrew Joslin Date: Tue, 20 May 2014 06:12:03 -0600 Subject: [PATCH] demo(ionHeaderBar, ionFooterBar): add kitchen sink demos --- js/angular/directive/headerFooterBar.js | 85 +++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/js/angular/directive/headerFooterBar.js b/js/angular/directive/headerFooterBar.js index 1447268436..fd63943cf6 100644 --- a/js/angular/directive/headerFooterBar.js +++ b/js/angular/directive/headerFooterBar.js @@ -15,6 +15,9 @@ IonicModule * Can also be a subheader (lower down) if the 'bar-subheader' class is applied. * See [the header CSS docs](/docs/components/#subheader). * + * Note: If you use ionHeaderBar in combination with ng-if, the surrounding content + * will not align correctly. This will be fixed soon. + * * @param {string=} align-title Where to align the title. * Avaialble: 'left', 'right', or 'center'. Defaults to 'center'. * @@ -34,6 +37,45 @@ IonicModule * * ``` */ +/** + * @ngdoc demo + * @name ionHeaderBar#simple + * @module headerBarSimple + * @javascript + * angular.module('headerBarSimple', ['ionic']) + * .controller('HeaderBarSimpleCtrl', function($scope) { + * $scope.data = { + * isSubheader: false, + * isShown: true + * }; + * $scope.items = []; + * for (var i = 0; i < 20; i++) { + * $scope.items.push('Item ' + i); + * } + * }); + * + * @html + *
+ * + *

Tap Me to Scroll Top

+ *
+ * + * + * Make it a Subheader? + * + * + * Show it? + * + *
+ *
+ * {{item}} + *
+ *
+ *
+ *
+ */ .directive('ionHeaderBar', headerFooterBarDirective(true)) /** @@ -48,6 +90,9 @@ IonicModule * Can also be a subfooter (higher up) if the 'bar-subfooter' class is applied. * See [the footer CSS docs](/docs/components/#footer). * + * Note: If you use ionFooterBar in combination with ng-if, the surrounding content + * will not align correctly. This will be fixed soon. + * * @param {string=} align-title Where to align the title. * Avaialble: 'left', 'right', or 'center'. Defaults to 'center'. * @@ -67,6 +112,46 @@ IonicModule * * ``` */ +/** + * @ngdoc demo + * @name ionFooterBar#simple + * @module footerBarSimple + * @javascript + * angular.module('footerBarSimple', ['ionic']) + * .controller('FooterBarSimpleCtrl', function($scope) { + * $scope.data = { + * isSubfooter: false, + * isShown: true + * }; + * + * $scope.items = []; + * for (var i = 0; i < 20; i++) { + * $scope.items.push('Item ' + i); + * } + * }); + * + * @html + *
+ * + *

Footer

+ *
+ * + * + * Make it a Subfooter? + * + * + * Show it? + * + *
+ *
+ * {{item}} + *
+ *
+ *
+ *
+ */ .directive('ionFooterBar', headerFooterBarDirective(false)); function tapScrollToTopDirective() {