mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-09 19:18:50 +01:00
chore(angular): update angular to rc3
This commit is contained in:
parent
0236ea72e9
commit
9312084fa4
3 changed files with 33 additions and 19 deletions
|
|
@ -1,25 +1,39 @@
|
|||
// Angular 2
|
||||
import {enableProdMode} from '@angular/core';
|
||||
|
||||
// rc2 workaround
|
||||
import { enableDebugTools, disableDebugTools } from '@angular/platform-browser';
|
||||
import { enableProdMode } from '@angular/core';
|
||||
// Environment Providers
|
||||
let PROVIDERS = [];
|
||||
let PROVIDERS = [
|
||||
// common env directives
|
||||
];
|
||||
|
||||
// Angular debug tools in the dev console
|
||||
// https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md
|
||||
let _decorateComponentRef = function identity(value) { return value; };
|
||||
|
||||
if ('production' === ENV) {
|
||||
// Production
|
||||
disableDebugTools();
|
||||
enableProdMode();
|
||||
|
||||
PROVIDERS = [
|
||||
...PROVIDERS
|
||||
...PROVIDERS,
|
||||
// custom providers in production
|
||||
];
|
||||
|
||||
} else {
|
||||
|
||||
_decorateComponentRef = (cmpRef) => enableDebugTools(cmpRef);
|
||||
|
||||
// Development
|
||||
PROVIDERS = [
|
||||
...PROVIDERS
|
||||
...PROVIDERS,
|
||||
// custom providers in development
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
export const decorateComponentRef = _decorateComponentRef;
|
||||
|
||||
export const ENV_PROVIDERS = [
|
||||
...PROVIDERS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue