Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
TypeaheadModule.forRoot(),
HttpModule,
HttpClientModule,
BrowserModule,
FormsModule,
ReactiveFormsModule,
RouterModule.forRoot(
appRoutes,
{enableTracing: true }
)
],
declarations: [ EditViewComponent,
ResourceFormComponent,
EntryFormComponent,
],
providers: [
{ provide: BASE_PATH, useValue: environment.locdbUrl},
// below: for karma/jasmine purposes
{ provide: APP_BASE_HREF, useValue: 'localhost:9876'},
LocdbService,
ScanService,
UserService,
BibliographicEntryService,
*/
@NgModule({
bootstrap: [ AppComponent ],
declarations: [
AppComponent,
HomeComponent,
NoContentComponent
],
/**
* Import Angular's modules.
*/
imports: [
BrowserModule,
FormsModule,
HttpModule,
RouterModule.forRoot(ROUTES, { useHash: true, preloadingStrategy: PreloadAllModules }),
MyLibModule
],
/**
* Expose our Services and Providers into Angular's dependency injection.
*/
providers: [
environment.ENV_PROVIDERS,
APP_PROVIDERS
]
})
export class AppModule { }
{ path: 'killers/sams-town', component: KSSamsTownDemo, data: { state: 'sams-town' } },
{ path: 'wikipedia', component: KSWikipediaDemo, data: { state: 'wikipedia' } },
],
},
{ path: 'dropdowns', component: KSDropdowns, data: { state: 'dropdowns' } },
{ path: 'signposts', component: KSSignposts, data: { state: 'signposts' } },
{ path: 'tooltips', component: KSTooltips, data: { state: 'tooltips' } },
{ path: 'typography', component: KSTypography, data: { state: 'typography' } },
{ path: 'wizards', component: KSWizards, data: { state: 'wizards' } },
{ path: 'progress-bars', component: KSProgressBars, data: { state: 'progress-bars' } },
{ path: 'spinners', component: KSSpinners, data: { state: 'spinners' } },
{ path: 'tables', component: KSTables, data: { state: 'tables' } },
{ path: 'treeview', component: KSTreeview, data: { state: 'treeview' } },
];
@NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] })
export class AppRoutingModule {}
symbolicName: 'devtools-app',
manifestUrl: environment.devtools_app_manifest_url,
scopeCheckDisabled: true,
},
{
symbolicName: 'testing-app',
exclude: !environment.testing_app_manifest_url,
manifestUrl: environment.testing_app_manifest_url,
},
{
symbolicName: 'angular-io-app',
manifestUrl: '/assets/angular-io-manifest.json',
},
],
}),
RouterModule.forRoot([], {useHash: true}),
BrowserAnimationsModule,
BrowserModule,
CustomExtensionModule,
],
bootstrap: [
AppComponent,
],
})
export class AppModule {
}
path: 'speakers',
children: [
{ path: '', component: SpeakerComponent },
{ path: 'create', component: SpeakerEditComponent },
{ path: 'detail/:id', component: SpeakerDetailComponent },
{ path: 'edit/:id', component: SpeakerEditComponent }
]
},
{ path: 'tracks', loadChildren: 'app/track/track.module#TrackModule' },
{ path: '**', redirectTo: '/home', pathMatch: 'full'}
]
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { PageNotFoundComponent } from './app.component';
const appRoutes: Routes = [
{ path: '', component: HomeComponent },
{ path: '**', component: PageNotFoundComponent },
];
export const AppRouting: ModuleWithProviders = RouterModule.forRoot(appRoutes);
{
path: "icons",
component: IconsComponent
},
{
path: "dataUi/:className",
component: DataUiComponent
},
{
path: "**",
redirectTo: "queueInfo",
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
providers: [
{
provide: RouteReuseStrategy,
useClass: CacheRouteReuseStrategy
}
]
})
export class AppRoutingModule { }
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { NotFoundPageComponent } from './modules/core/containers/not-found-page/not-found-page.component';
const routes: Routes = [
{ path: '', redirectTo: '/places', pathMatch: 'full' },
{
path: 'places',
loadChildren: './modules/places/places.module#PlacesModule',
},
{ path: '**', component: NotFoundPageComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes, { useHash: false })]
})
export class AppRouterModule {}
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {HttpClientModule} from '@angular/common/http';
import {RouterModule} from '@angular/router';
import { HomeComponent } from './home/home.component';
@NgModule({
declarations: [
AppComponent,
HomeComponent
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
RouterModule.forRoot([
{
path: 'app/:appName/:route',
component: AppComponent
},
{
path: 'app/:appName',
component: AppComponent
},
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent,
NavigationComponent
],
imports: [
BrowserModule,
TranslateModule,
NgbModule.forRoot(),
RouterModule.forRoot([])
],
providers: [
{ provide: TranslateService, useClass: MockTranslateService },
{ provide: APP_BASE_HREF, useValue: '/' },
AppComponent
]
});
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
});