@angular/platform-browser-dynamic#platformBrowserDynamic TypeScript Examples
The following examples show how to use
@angular/platform-browser-dynamic#platformBrowserDynamic.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: main.browser.ts From ng-event-plugins with Apache License 2.0 | 6 votes |
platformBrowserDynamic()
.bootstrapModule(AppBrowserModule)
.then(ref => {
const windowRef: any = window;
// Ensure Angular destroys itself on hot reloads for Stackblitz
if (windowRef['ngRef']) {
windowRef['ngRef'].destroy();
}
windowRef['ngRef'] = ref;
})
.catch(err => console.error(err));
Example #2
Source File: main.ts From blockcore-hub with MIT License | 6 votes |
init = () => {
platformBrowserDynamic().bootstrapModule(AppModule, [
{
// Disable global encapsulation, as it breaks many third party angular components.
// defaultEncapsulation: ViewEncapsulation.None
}
])
.then(() => (window as any).appBootstrap && (window as any).appBootstrap())
.catch(err => console.error('NG Bootstrap Error =>', err));
}
Example #3
Source File: main.ts From javascript-angular-chat-app with MIT License | 6 votes |
CometChat.init(COMETCHAT_CONSTANTS.APP_ID, appSetting).then(() => {
console.log('app is ready to work');
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
}, (error) => {
console.log('Error In Init', error);
});
Example #4
Source File: main.ts From geonetwork-ui with GNU General Public License v2.0 | 6 votes |
SETTINGS.init().then(
() => {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err))
},
(error) => {
console.error(`Application boostrap fails :\n${error.message}`, error.stack)
}
)
Example #5
Source File: main.qiankun.ts From qiankun with MIT License | 6 votes |
{ bootstrap, mount, unmount } = singleSpaAngular({
bootstrapFunction: singleSpaProps => {
singleSpaPropsSubject.next(singleSpaProps);
return platformBrowserDynamic(getSingleSpaExtraProviders()).bootstrapModule(AppModule);
},
template: '<app-root />',
Router,
NgZone: NgZone,
})
Example #6
Source File: main.ts From ng-util with MIT License | 6 votes |
bootstrap = () => {
return platformBrowserDynamic()
.bootstrapModule(AppModule, {
defaultEncapsulation: ViewEncapsulation.None,
preserveWhitespaces: false,
})
.then(res => {
if ((window as any).appBootstrap) {
(window as any).appBootstrap();
}
return res;
});
}
Example #7
Source File: main.ts From digital-bank-ui with Mozilla Public License 2.0 | 6 votes |
platformBrowserDynamic([
{ provide: 'tokenExpiryBuffer', useValue: 1000 * 60 },
{ provide: 'cacheExpiry', useValue: 10000 },
{ provide: 'identityBaseUrl', useValue: '/identity/v1' },
{ provide: 'officeBaseUrl', useValue: '/api/office/v1' },
{ provide: 'customerBaseUrl', useValue: '/api/customer/v1' },
{ provide: 'accountingBaseUrl', useValue: '/api/accounting/v1' },
{ provide: 'portfolioBaseUrl', useValue: '/api/portfolio/v1' },
{ provide: 'depositAccountBaseUrl', useValue: '/api/deposit/v1' },
{ provide: 'tellerBaseUrl', useValue: '/api/teller/v1' },
{ provide: 'reportingBaseUrl', useValue: '/api/reporting/v1' },
{ provide: 'chequeBaseUrl', useValue: '/api/cheques/v1' },
{ provide: 'payrollBaseUrl', useValue: '/api/payroll/v1' },
{ provide: 'groupBaseUrl', useValue: '/api/group/v1' },
])
.bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #8
Source File: main.ts From one-platform with MIT License | 5 votes |
window.OpAuthHelper.onLogin(() => {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
});
Example #9
Source File: main.ts From 1hop with MIT License | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #10
Source File: main.ts From 1x.ag with MIT License | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #11
Source File: main.ts From Uber-ServeMe-System with MIT License | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
Example #12
Source File: main.ts From homebridge-nest-cam with GNU General Public License v3.0 | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
Example #13
Source File: main.ts From Smersh with MIT License | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
Example #14
Source File: main.ts From xBull-Wallet with GNU Affero General Public License v3.0 | 5 votes |
platformBrowserDynamic(storageProviders)
.bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #15
Source File: main.ts From rubic-app with GNU General Public License v3.0 | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #16
Source File: main.ts From ng-devui-admin with MIT License | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.error(err));
Example #17
Source File: main.ts From angular-electron-admin with Apache License 2.0 | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #18
Source File: main.ts From dbm with Apache License 2.0 | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #19
Source File: main.ts From RcloneNg with MIT License | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #20
Source File: main.ts From Flutterwave-Angular-v3 with MIT License | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule);
Example #21
Source File: main.ts From Bridge with GNU General Public License v3.0 | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err))
Example #22
Source File: main.ts From ng-conf-2020-workshop with MIT License | 5 votes |
document.addEventListener('DOMContentLoaded', () => {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
});
Example #23
Source File: main.ts From ngx-colors with MIT License | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #24
Source File: main.ts From Collab-Blog with GNU General Public License v3.0 | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Example #25
Source File: main.ts From league-profile-tool with MIT License | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule, {
preserveWhitespaces: false
})
.catch(err => console.error(err));
Example #26
Source File: main.ts From mylog14 with GNU General Public License v3.0 | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
Example #27
Source File: main.ts From msfs-community-downloader with GNU Affero General Public License v3.0 | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule, {
preserveWhitespaces: false
})
.catch(err => console.error(err));
Example #28
Source File: main.ts From leapp with Mozilla Public License 2.0 | 5 votes |
platformBrowserDynamic().bootstrapModule(AppModule);
Example #29
Source File: main.ts From BetterCrewlink-mobile with GNU General Public License v3.0 | 5 votes |
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch((err) => console.log(err));