ngx-admin/src/platform/browser/providers.ts

31 lines
753 B
TypeScript

/*
* These are globally available services in any component or any other service
*/
import {provide} from 'angular2/core';
// Angular 2
import {FORM_PROVIDERS} from 'angular2/common';
// Angular 2 Http
import {HTTP_PROVIDERS} from 'angular2/http';
// Angular 2 Router
import {ROUTER_PROVIDERS} from 'angular2/router';
import {LocationStrategy, PathLocationStrategy} from 'angular2/platform/common'
/*
* Application Providers/Directives/Pipes
* providers/directives/pipes that only live in our browser environment
*/
export const APPLICATION_PROVIDERS = [
...FORM_PROVIDERS,
...HTTP_PROVIDERS,
...ROUTER_PROVIDERS,
provide(LocationStrategy, { useClass: PathLocationStrategy })
];
export const PROVIDERS = [
...APPLICATION_PROVIDERS
];