DG
Size: a a a
DG
АО
СК
DP
DG
DP
import { PLATFORM_ID } from '@angular/core';
import { isPlatformBrowser, isPlatformServer } from '@angular/common';
...
constructor(public store: Store<any>,
@Inject(PLATFORM_ID) private _platformId: object) {
isPlatformBrowser(this._platformId);
}
ngOnInit() {
if (isPlatformBrowser(this._platformId)) {
// INITIAL BROWSER CODE
}
if (isPlatformServer(this._platformId)) {
console.log('server');
}
}ИК
externals: [nodeExternals()], на externals: [/(node_modules|main\..*\.js)/],ИК
СК
ИК
СК
АО
P
ИК
DG
P
KA
P
DP