Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {disableDeprecatedForms, provideForms} from '@angular/forms';
import {appRoutes} from '../app/app.routes';
/*
* Application Providers/Directives/Pipes
* providers/directives/pipes that only live in our browser environment
*/
export const APPLICATION_PROVIDERS = [
// new Angular 2 forms
// disableDeprecatedForms(),
// provideForms(),
...FORM_PROVIDERS,
provideRouter(appRoutes),
...HTTP_PROVIDERS,
{ provide: LocationStrategy, useClass: HashLocationStrategy}
];
export const PROVIDERS = [
...APPLICATION_PROVIDERS
];
import { MdSidenav } from '@angular/material';
import { Media } from 'ng2-material';
import { ComponentsComponent } from './+components';
import { IndexComponent } from './+index';
import { ComponentsService, IComponentMeta } from './shared/components.service';
import { FooterComponent } from './shared/footer/footer.component';
import { NavigationService } from './shared/navigation.service';
import { ComponentsOrderByPipe } from './site.pipe';
export const routes: RouterConfig = [
{path: '', component: IndexComponent},
{path: 'components/:id', component: ComponentsComponent}
];
export const AppRouterProviders = [
provideRouter(routes)
];
@Component({
moduleId: module.id,
selector: 'site-app',
templateUrl: 'site.component.html',
styleUrls: ['site.component.css'],
pipes: [ComponentsOrderByPipe],
// directives: [
// ROUTER_DIRECTIVES, MATERIAL_DIRECTIVES, MD_SIDENAV_DIRECTIVES, MdIcon, MdToolbar,
// FooterComponent
// ]
})
export class SiteAppComponent implements OnInit,
OnDestroy, AfterViewInit {
import {AppComponent} from './app';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {provide} from '@angular/core';
import {LocationStrategy, PathLocationStrategy } from '@angular/common';
import {provideRouter} from '@angular/router';
import {disableDeprecatedForms, provideForms} from '@angular/forms';
import {DIALOG_PROVIDERS} from '../components/dialog/dialog';
import {routes} from './routes';
bootstrap(AppComponent, [
DIALOG_PROVIDERS,
disableDeprecatedForms(),
provideForms(),
provideRouter(routes),
provide(LocationStrategy, { useClass: PathLocationStrategy })
]);
component: team_component_1.TeamComponent
},
{
path: 'contact',
component: contact_component_1.ContactComponent
},
{
path: 'brokers',
component: brokers_component_1.BrokersComponent
},
{
path: 'yahoo-finance',
component: yahoo_finance_component_1.YahooFinanceComponent
},
]);
exports.APP_ROUTER_PROVIDER = router_1.provideRouter(exports.AppRoutes);
//# sourceMappingURL=app.routes.js.map
"use strict";
var router_1 = require("@angular/router");
var app_component_1 = require("./app/app.component");
exports.routes = [
{ path: '', component: app_component_1.AppComponent },
{ path: ':lang', component: app_component_1.AppComponent }
];
exports.APP_ROUTER_PROVIDERS = [
router_1.provideRouter(exports.routes)
];
//# sourceMappingURL=main.routes.js.map
import { provideRouter, RouterConfig } from '@angular/router'
import { RacesComponent } from './races.component'
import { ScoreboardComponent } from './scoreboard.component'
import { AboutComponent } from './about.component'
export const routes: RouterConfig = [
{ path: '', component: AboutComponent },
{ path: 'schedule', component: RacesComponent },
{ path: 'scoreboard', component: ScoreboardComponent }
]
export const APP_ROUTER_PROVIDERS = [
provideRouter(routes)
]
export const routes: RouterConfig = [
{
path: 'page1',
component: Page1Component
},
{
path: 'page2',
component: Page2Component
},
{ path: '',
component: Page1Component
}
];
export const APP_ROUTER_PROVIDERS = [
provideRouter(routes)
];
import {AppComponent} from './app';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {provide} from '@angular/core';
import {LocationStrategy, PathLocationStrategy } from '@angular/common';
import {provideRouter} from '@angular/router';
import {disableDeprecatedForms, provideForms} from '@angular/forms';
import {DIALOG_PROVIDERS} from '../components/dialog/dialog';
import {routes} from './routes';
bootstrap(AppComponent, [
DIALOG_PROVIDERS,
disableDeprecatedForms(),
provideForms(),
provideRouter(routes),
provide(LocationStrategy, { useClass: PathLocationStrategy })
]);
checkout: {
path: 'checkout',
as: 'checkout',
component: CheckoutComponent
},
orders: {
path: 'orders',
as: 'orders',
component: OrderComponent
}
};
var routes = Object.keys(Routes).map(r => Routes[r]);
export const APP_ROUTER_PROVIDERS = [
provideRouter(routes)
];