Android Subheader Fix

Android Subheader Fix

Fix for Material Design and Subheader

$0.00

Christopher Pawlukiewicz

Christopher Pawlukiewicz

Member since 2015

Details

Version:
1.0
Ionic:
 
Platforms:
Android  
Released:
5 years ago
Updated:
5 years ago
Category:
Plugins
Tags:
,

Ionic decided to leave out something incredibly basic -- subheaders with android. I fixed this.

.tabs-top.subheader > .tabs { top: 90px; }

.run(function ($rootScope, $state, $log) { $rootScope.$on('$stateChangeSuccess', function () { $log.log($state.current.name); var tabs = angular.element(document.querySelector(".tabs-top")); //change 'tab.chats' to state you want run on if ($state.current.name == "tab.chats") { tabs.addClass('subheader'); } else { tabs.removeClass('subheader'); } }); });