refactor(core): change bootstrap of modules and names of platforms
BREAKING CHANGES: - `browserPlatform`/`browserDynamicPlatform`/... have been deprecated and renamed into `platformBrowser`/`platformBrowserDynamic`/.... - `bootstrapModule` and `bootstrapModuleFactory` have been moved to be members of `PlaformRef`. E.g. `platformBrowserDynamic().bootstrapModule(MyModule)`.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgModuleFactory, NgModuleRef, bootstrapModuleFactory} from '@angular/core';
|
||||
import {NgModuleFactory, NgModuleRef} from '@angular/core';
|
||||
import {ComponentFixture} from '@angular/core/testing';
|
||||
import {serverPlatform} from '@angular/platform-server';
|
||||
|
||||
@ -14,7 +14,7 @@ import {MainModule} from '../src/module';
|
||||
import {MainModuleNgFactory} from '../src/module.ngfactory';
|
||||
|
||||
export function createModule(): NgModuleRef<MainModule> {
|
||||
return bootstrapModuleFactory(MainModuleNgFactory, serverPlatform());
|
||||
return serverPlatform().bootstrapModuleFactory(MainModuleNgFactory);
|
||||
}
|
||||
|
||||
export function createComponent<C>(comp: {new (...args: any[]): C}): ComponentFixture<C> {
|
||||
|
Reference in New Issue
Block a user