Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {Injectable} from '@angular/core';
- // Declare TabsService as a provider in app.module.ts
- // Inject TabsService in your class: constructor(public tabs: TabsService){}
- // Use the this.tabs.hide() or this.tabs.show() methods wherever you want
- @Injectable()
- export class TabsService {
- constructor() {}
- public hide() {
- let tabs = document.querySelectorAll('.tabbar');
- if (tabs !== null) {
- Object.keys(tabs).map((key) => {
- tabs[key].style.transform = 'translateY(56px)';
- });
- }
- }
- public show() {
- let tabs = document.querySelectorAll('.tabbar');
- if (tabs !== null) {
- Object.keys(tabs).map((key) => {
- tabs[key].style.transform = 'translateY(0px)';
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement