Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
AppModule = __decorate([
core_1.NgModule({
declarations: [
app_component_1.AppComponent,
home_component_1.TestComponent,
home_component_1.HomeComponent,
home_component_1.NotFoundComponent
],
imports: [
platform_browser_1.BrowserModule.withServerTransition({ appId: 'my-app' }),
router_1.RouterModule.forRoot([
{ path: '', component: home_component_1.HomeComponent },
{ path: 'test', component: home_component_1.TestComponent }
// { path: '**', component: NotFoundComponent }
], { initialNavigation: true }),
common_1.TransferHttpCacheModule
],
providers: [],
bootstrap: [app_component_1.AppComponent]
})
], AppModule);
return AppModule;
}());
exports.AppModule = AppModule;
AppModule = __decorate([
core_1.NgModule({
declarations: [
app_component_1.AppComponent,
home_component_1.TestComponent,
home_component_1.HomeComponent,
home_component_1.NotFoundComponent
],
imports: [
platform_browser_1.BrowserModule.withServerTransition({ appId: 'my-app' }),
router_1.RouterModule.forRoot([
{ path: '', component: home_component_1.HomeComponent },
{ path: 'test', component: home_component_1.TestComponent }
// { path: '**', component: NotFoundComponent }
], { initialNavigation: true }),
common_1.TransferHttpCacheModule
],
providers: [],
bootstrap: [app_component_1.AppComponent]
})
], AppModule);
return AppModule;
}());
exports.AppModule = AppModule;
RouterModule.forRoot(routeConfig.map(r => assignComponent(r, MockComponent))),
],
declarations: [MockComponent]
})
class MockModule { }
@NgModule({
imports: [
ServerModule,
MockModule,
ModuleMapLoaderModule
]
})
class MockServerModule {}
const factory = await compiler.compileModuleAsync(MockServerModule);
return lsRoutes(factory, moduleMap);
}
return () => {
return chain([
addUniversalCommonRule(options),
addServerFile(options),
addDependencies(options),
]);
};
}
return () => {
return chain([
addUniversalCommonRule(options),
addServerFile(options),
addDependencies(options),
]);
};
}
return async host => {
if (!getPackageJsonDependency(host, '@nguniversal/express-engine')) {
throw new SchematicsException('Could not find dependency on @nguniversal/express-engine');
}
const collectionPath = require.resolve('../../collection.json');
return version9UpdateRule(collectionPath);
};
}
return async host => {
if (!getPackageJsonDependency(host, '@nguniversal/hapi-engine')) {
throw new SchematicsException('Could not find dependency on @nguniversal/hapi-engine');
}
const collectionPath = require.resolve('../../collection.json');
return version9UpdateRule(collectionPath);
};
}
return async host => {
const clientProject = await getProject(host, options.clientProject);
const browserDistDirectory = await getOutputPath(host, options.clientProject, 'build');
return mergeWith(
apply(url('./files'), [
template({
...strings,
...options,
stripTsExtension,
browserDistDirectory,
}),
move(clientProject.root)
])
);
};
}
return async host => {
const clientProject = await getProject(host, options.clientProject);
const browserDistDirectory = await getOutputPath(host, options.clientProject, 'build');
return mergeWith(
apply(url('./files'), [
template({
...strings,
...options,
stripTsExtension,
browserDistDirectory,
}),
move(clientProject.root)
])
);
};
}
return async host => {
const clientProject = await getProject(host, options.clientProject);
const browserDistDirectory = await getOutputPath(host, options.clientProject, 'build');
return mergeWith(
apply(url('./files'), [
template({
...strings,
...options,
stripTsExtension,
browserDistDirectory,
}),
move(clientProject.root)
])
);
};
}