Scenario Description:
Click Test Device 1 to jump to the device Details page, hide the bottom title bar Ion-tabs on the device Details page, and display the bottom title bar when the page is returned from the device Details page to the home page.
Specific steps:
1. Add after Ion-tabs
ng-class="{' tabs-item-hide '$root. Hidetabs }"
2. Add in App.js
. directive (' ShowTabs '($rootScope) {
{
restrict' A ',
($scope, $el) {
$rootScope. false;}}
)
. Directive (' Hidetabs '($rootScope) {
restrict' A '
,($scope, $el) {
$rootScope. true;
}
;
})
3. Hide, add after Ion-view in the device details page
Hide-tabs
4. Display, adding in the controller of the home page
$scope. $on (' $ionicView. Enter '() {
//display tabs
$rootScope. false;
})
Note: To add $rootscope after the function here, the code follows
. Controller (' HomeController ',function($scope, $rootScope) {
$scope. Title=' home '
$scope. = [];
for (i=0;i<10;i++)
$scope. items. push ([test device, I+1].join (")")
$scope. $on (' $ionicView. Enter ' () {//Show tabs $rootScope.
false;
})
}
This realizes the function in the above scenario description.
As just beginning to contact Ionic development, a lot of things are not very understand, said some ink, forgive ...
Reference URL: http://www.cnblogs.com/maoyazhi/p/4424039.html