本文整理匯總了TypeScript中@angular/platform-browser.BrowserModule類的典型用法代碼示例。如果您正苦於以下問題:TypeScript BrowserModule類的具體用法?TypeScript BrowserModule怎麽用?TypeScript BrowserModule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了BrowserModule類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
BrowserModule.withServerTransition({appId: APP_ID}),
BrowserTransferStateModule,
]
});
doc = TestBed.get(DOCUMENT);
});
示例2: beforeEach
beforeEach(() => {
ajax.inject = function(obj) {
sendRequest = obj['sendRequest'];
};
TestBed.configureTestingModule(
{
declarations: [TestContainerComponent],
imports: [ServerModule,
DxServerTransferStateModule,
ServerTransferStateModule,
BrowserModule.withServerTransition({appId: 'appid'})]
});
});
示例3:
import { SharedModule } from './shared/shared.module';
import { AppComponent } from './app.component';
import { AppRoutes } from './app.routes';
import { HomeComponent } from './home/home.component';
const COMPONENTS = [
AppComponent,
HomeComponent,
];
const PROVIDERS = [
];
const IMPORTS = [
BrowserModule.withServerTransition({appId: 'ngbe-app'}),
RouterModule.forRoot([
...AppRoutes
]),
SharedModule,
TransferHttpCacheModule
];
@NgModule({
declarations: [
...COMPONENTS
],
imports: [
...IMPORTS,
],
providers: [