本文整理汇总了TypeScript中ionic-angular.ionicBootstrap函数的典型用法代码示例。如果您正苦于以下问题:TypeScript ionicBootstrap函数的具体用法?TypeScript ionicBootstrap怎么用?TypeScript ionicBootstrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ionicBootstrap函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: ionicProviders
Meteor.startup(function() {
// define array of bootstrap providers
var providers = ionicProviders(args.providers).concat(args.providers || [], METEOR_PROVIDERS);
// auto add Ionic directives
let directives = args.directives ? args.directives.concat(IONIC_DIRECTIVES) : IONIC_DIRECTIVES;
// automatically provide all of Ionic's directives to every component
providers.push(provide(PLATFORM_DIRECTIVES, { useValue: [directives], multi: true }));
if (args.prodMode) {
enableProdMode();
}
ionicBootstrap(cls, providers, args.config);
return cls;
});
示例2: if
}
else if(type == 'logout')
{
localStorage.removeItem('username');
localStorage.removeItem('password');
localStorage.removeItem('MPin');
this.nav.setRoot(LoginPage);
}
}
},
{
text:'No',
handler : () => {alert.dismiss(); this.dialogOpened = false;}
}
]
});
alert.present();
}
}
ionicBootstrap(MyApp, [CommonService], {
//tabbarPlacement: 'bottom'
// Below code is for ionic View only, In Real devices it works perfectly.
platforms: {
ios: {
statusbarPadding: true
}
}
});
示例3: buyerEvents
// stop scanning
self.centralBle.stop();
});
// write event
this.events.subscribe('central:write', (eventData) => {
console.log('event: write', eventData[0]);
self.centralBle.write(JSON.stringify(eventData[0]));
});
}
/**
* Buyer event listeners
*/
buyerEvents() {
// initialize the peripheral ble
this.peripheralBle.init();
this.events.subscribe('peripheral:stop', (eventData) => {
this.peripheralBle.stop();
});
// do some cleanup by removing the looking for product data
this.localStorage.removeFromLocal('looking_for');
}
}
ionicBootstrap(MyApp, [
provide('CouchDBEndpoint', {useValue: 'http://192.168.0.109:5984/'}),
provide('APIEndpoint', {useValue: 'http://192.168.0.124/'})])
示例4: constructor
constructor(platform:Platform) {
this.rootPage = TabsPage;
this.initializeApp(platform);
}
private initializeApp(platform:Platform) {
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.
this.hideSplashScreen();
StatusBar.styleDefault();
StatusBar.backgroundColorByHexString("#5e6772");
});
}
hideSplashScreen() {
if(navigator && navigator.splashscreen) {
setTimeout(()=> {
navigator.splashscreen.hide();
}, 1000);
}
}
}
ionicBootstrap(MyApp, null, {
tabbarPlacement: 'bottom',
backButtonText: '',
modalEnter: 'modal-slide-in',
modalLeave: 'modal-slide-out'
});
示例5: constructor
})
export class JerryApp implements OnInit{
private rootPage:any;
public authUser:any;
public isAuthUser:boolean;
constructor(
private platform:Platform,
private modal: ModalController
) {
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();
console.info('Platform Ready', platform);
this.rootPage = DashboardComponent;
});
}
ngOnInit(){
}
}
ionicBootstrap(JerryApp, [Geyser, ParticleService]);
示例6: enableProdMode
this.locationService.refreshCurrentLocation();
this.events.subscribe("loginSuccess", () => {
this.rootPage = TabsPage;
});
// Check if existing user
this.db.get("account").then(data => {
if (data !== undefined) {
//TODO Implement offline mode if there is no network connection
this.accountService.tokenLogin(JSON.parse(data));
} else {
// Display intro page for new users w/c allows them to register/login
this.rootPage = IntroPage;
}
},
error => {
console.log("DB Failure");
}
);
}
}
if (!app_config.is_debug)
enableProdMode();
ionicBootstrap(Blottr)
示例7: ionicBootstrap
authDomain: "gadash-nirim.firebaseapp.com",
databaseURL: "https://gadash-nirim.firebaseio.com",
storageBucket: "gadash-nirim.appspot.com",
};
firebase.initializeApp(FbConfig);
this.rootPage = LoginPage;
firebase.auth().onAuthStateChanged((user) => {
if (user) {
// If there's a user take him to the home page.
this.rootPage = HomePage;
} else {
// If there's no user logged in send him to the LoginPage
this.rootPage = LoginPage;
}
});
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();
});
}
}
ionicBootstrap(MyApp, [
provideStore({ entries })
]);
示例8: constructor
import {StatusBar} from 'ionic-native';
import {TabsPage} from './pages/tabs/tabs';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class MyApp {
private rootPage: any;
constructor(private platform: Platform) {
this.rootPage = TabsPage;
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();
});
}
}
//ionicBootstrap(MyApp);
ionicBootstrap(MyApp, null, {
platforms: {
ios: {
statusBarPadding: true
}
}
});
示例9: constructor
})
export class MyApp {
private rootPage: any;
constructor(
platform: Platform,
recipeService : RecipeService,
ingredientService : IngredientService,
utilService: UtilService) {
this.rootPage = TabsPage;
platform.ready().then(() => {
recipeService.initDB();
ingredientService.initDB();
utilService.updateView();
// 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();
});
}
}
ionicBootstrap(MyApp, [
disableDeprecatedForms(), provideForms(),
RecipeService, IngredientService, UtilService,
HTTP_PROVIDERS
]);
示例10: constructor
import {TabsPage} from './pages/tabs/tabs';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class MyApp {
private rootPage: any;
constructor(private platform: Platform) {
this.rootPage = TabsPage;
this.platform = platform;
this.initializeApp();
}
initializeApp(){
this.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();
//console.log(this.platform.platforms());
});
}
}
ionicBootstrap(MyApp,[JSONP_PROVIDERS]);