File

src/app/app.component.ts

Metadata

templateUrl app.html

Index

Properties

Constructor

constructor(platform: Platform, menu: MenuController, statusBar: StatusBar, splashScreen: SplashScreen, config: Config, navProxy: NavProxyService, alertCtrl: AlertController, msgService: MessagingService, chatManager: ChatManager)

1 - init firebase 2 - quando

Parameters :
Name Type Optional Description
platform Platform
menu MenuController
statusBar StatusBar
splashScreen SplashScreen
config Config
navProxy NavProxyService
alertCtrl AlertController
msgService MessagingService
chatManager ChatManager

Properties

Public alertCtrl
alertCtrl: AlertController
Type : AlertController
Public chatManager
chatManager: ChatManager
Type : ChatManager
Public config
config: Config
Type : Config
detailNav
detailNav: Nav
Type : Nav
Decorators : ViewChild
detailPage
detailPage: any
Type : any
Default value : null
masterNav
masterNav: Nav
Type : Nav
Decorators : ViewChild
masterPage
masterPage: any
Type : any
Default value : null
Public menu
menu: MenuController
Type : MenuController
Public msgService
msgService: MessagingService
Type : MessagingService
pages
pages: Array<literal type>
Type : Array<literal type>
Public platform
platform: Platform
Type : Platform
Public splashScreen
splashScreen: SplashScreen
Type : SplashScreen
Public statusBar
statusBar: StatusBar
Type : StatusBar
Public user
user: any
Type : any
Public zone
zone: NgZone
Type : NgZone
import { Component, ViewChild, NgZone } from '@angular/core';
import { Platform, MenuController, Nav, AlertController } from 'ionic-angular';
import * as firebase from 'firebase/app';
import { ListaConversazioniPage } from '../pages/lista-conversazioni/lista-conversazioni';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Config } from 'ionic-angular';
import {NavProxyService} from '../providers/nav-proxy';
//import {PlaceholderPage} from '../pages/placeholder/placeholder';
import { MessagingService } from '../providers/messaging-service';
import { ChatManager } from '../providers/chat-manager/chat-manager';


@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  // Grab References to our 2 NavControllers...
  @ViewChild('detailNav') detailNav: Nav;
  @ViewChild('masterNav') masterNav: Nav;
  // Empty placeholders for the 'master/detail' pages...
  masterPage: any = null;
  detailPage: any = null;
  public zone:NgZone;
  public user:any;
  pages: Array<{title: string, component: any}>;
  /**
   * 1 - init firebase
   * 2 - quando
   * @param platform 
   * @param menu 
   * @param statusBar 
   * @param splashScreen 
   * @param config 
   * @param navProxy 
   * @param alertCtrl 
   * @param msgService 
   * @param chatManager 
   */
  constructor(
    public platform: Platform,
    public menu: MenuController,
    public statusBar: StatusBar,
    public splashScreen: SplashScreen,
    public config: Config,
    private navProxy: NavProxyService,
    public alertCtrl: AlertController,
    public msgService: MessagingService,
    public chatManager: ChatManager
  ) {
    this.zone = new NgZone({});
    firebase.initializeApp(config.get("firebaseConfig"));
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();

      // alert("  navProxy.masterNav: ");
      // Add our nav controllers to
      // the nav proxy service...
      navProxy.masterNav = this.masterNav;
      navProxy.detailNav = this.detailNav;
      this.masterNav.setRoot(ListaConversazioniPage, { detailNavCtrl: this.detailNav });
      // this.detailNav.setRoot(PlaceholderPage);
      this.msgService.initMessage();
      this.msgService.getPermission();
      // set tenant
      let appConfig = config.get("appConfig");
      const tenant = appConfig.tenant;
      // init chat manager
      this.chatManager.configureWithAppId(tenant);
    });
  }
}
<!--<ion-split-pane>

 <ion-nav [root]="rootPage" #content main swipeBackEnabled="false"></ion-nav>
  <ion-menu [content]="content">

    <ion-header>
      <ion-toolbar>
        <ion-title>Pages</ion-title>
      </ion-toolbar>
    </ion-header>

    <ion-content>
      <ion-list>
        <button ion-item *ngFor="let p of pages" (click)="openPage(p)">
          {{p.title}}
        </button>
      </ion-list>
    </ion-content>

  </ion-menu>

  <ion-nav [root]="rootPage" #content main swipeBackEnabled="false"></ion-nav>
</ion-split-pane>-->


<ion-split-pane (ionChange)="navProxy.onSplitPaneChanged($event._visible);">
    <ion-nav [root]="masterPage" #masterNav></ion-nav>
    <ion-nav [root]="detailPage" #detailNav main></ion-nav>
</ion-split-pane>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""