當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript pro.Pro類代碼示例

本文整理匯總了TypeScript中@ionic/pro.Pro的典型用法代碼示例。如果您正苦於以下問題:TypeScript Pro類的具體用法?TypeScript Pro怎麽用?TypeScript Pro使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Pro類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule, Injectable, Injector } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { Pro } from '@ionic/pro';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
Pro.init('2066f7b9', {
  appVersion: '0.0.1'
})

@Injectable()
export class MyErrorHandler implements ErrorHandler {
  ionicErrorHandler: IonicErrorHandler;

  constructor(injector: Injector) {
    try {
      this.ionicErrorHandler = injector.get(IonicErrorHandler);  
       //   alert("constructor try");
    } catch(e) {
      //alert("error:"+e);
      // Unable to get the IonicErrorHandler provider, ensure
      // IonicErrorHandler has been added to the providers list below
    }
  }

  handleError(err: any): void {
    //alert("err:"+err);
    Pro.monitoring.handleNewError(err);
    // Remove this if you want to disable Ionic's auto exception handling
開發者ID:terrytang0702,項目名稱:DeployApp,代碼行數:31,代碼來源:app.module.ts

示例2: constructor

import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';

import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

// set my app Id
Pro.init("31e1854a", {
  appVersion: "0.0.1"
})

@Injectable()
export class MyErrorHandler implements ErrorHandler {
  ionicErrorHandler: IonicErrorHandler;

  constructor(injector: Injector) {
    try {
      this.ionicErrorHandler = injector.get(IonicErrorHandler);
    } catch(e) {
      console.error("unable to get the IonicErrorHandler provider, ensure");
      console.error("IonicErrorHandler has been added to the providers list below!");
    }
  }
開發者ID:jenart,項目名稱:SweetApp,代碼行數:30,代碼來源:app.module.ts

示例3:

import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';

import { HomeProvider } from '../providers/home/home';

import { HttpModule, JsonpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';


Pro.init('8bd4c1dd', {
  appVersion: '0.0.1'
});

@NgModule({
  declarations: [
    MyApp,
    HomePage,
  ],
  imports: [
    BrowserModule,
   HttpModule,
    JsonpModule,
    HttpClientModule,
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
開發者ID:wahegurujee,項目名稱:ionicProject,代碼行數:31,代碼來源:app.module.ts

示例4:

import { BrowserModule } from '@angular/platform-browser';
import { Pro } from '@ionic/pro';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { ScreenOrientation } from '@ionic-native/screen-orientation';

import { MyApp } from './app.component';
import { BookPage } from '../pages/book/book';
import { TocPage } from '../pages/toc/toc';
import { SettingsPage } from '../pages/settings/settings';

Pro.init('f9f2f3cc', {
  appVersion: '1.0'
})

@NgModule({
  declarations: [
    MyApp,
    BookPage,
    TocPage,
    SettingsPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
開發者ID:ibby89,項目名稱:hajjapp,代碼行數:31,代碼來源:app.module.ts

示例5: handleError

import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { MomentModule } from 'angular2-moment';

import { MyApp } from './app.component';
import { SharedModule } from './shared.module';
import { GreybackProvider } from '../providers/greyback/greyback';
import { AudioProvider } from '../providers/audio/audio';
import { HttpClientModule } from '@angular/common/http';

import { Pro } from '@ionic/pro';
const IonicPro = Pro.init('2191a4b0', {
	appVersion: "1.0.0"
});
export class MyErrorHandler implements ErrorHandler {
	handleError(err: any): void {
		IonicPro.monitoring.handleNewError(err);
	}
}
@NgModule({
	declarations: [
		MyApp
	],
	imports: [
		BrowserModule,
		HttpModule,
		IonicModule.forRoot(MyApp, {
			mode: 'ios'
開發者ID:tonymccallie,項目名稱:gracepoint,代碼行數:31,代碼來源:app.module.ts

示例6: constructor

import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ArchivedTodosPage } from '../pages/archived-todos/archived-todos';
import { TodoProvider } from '../providers/todo/todo';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';

import { Pro } from '@ionic/pro';
import { Injectable, Injector } from '@angular/core';

Pro.init('dc972ad6', {
  appVersion: '0.0.1'
})

@Injectable()
export class MyErrorHandler implements ErrorHandler {
  ionicErrorHandler: IonicErrorHandler;

  constructor(injector: Injector) {
    try {
      this.ionicErrorHandler = injector.get(IonicErrorHandler);
    } catch(e) {
      // Unable to get the IonicErrorHandler provider, ensure
      // IonicErrorHandler has been added to the providers list below
    }
  }
開發者ID:wmswina,項目名稱:todo,代碼行數:30,代碼來源:app.module.ts


注:本文中的@ionic/pro.Pro類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。