Command Line Build Tasks
- Important: Make sure you have Node 4 or greater!
+ Important: Make sure you have Node 6.9 or greater!
First install the CLI
- npm install -g angular-cli@latest
+ npm install -g @angular/cli@latest
Local server
diff --git a/src/app/components/docs/overview/overview.component.html b/src/app/components/docs/overview/overview.component.html
index cd5f614d0..f5db25f87 100644
--- a/src/app/components/docs/overview/overview.component.html
+++ b/src/app/components/docs/overview/overview.component.html
@@ -31,7 +31,7 @@
Create a new Git repository for your product
Start Developing!
Prerequisites
- - Node 4.4.4+
+ - Node 6.9+
- NPM 3+
- Angular CLI
- Protractor (for testing)
@@ -39,7 +39,7 @@ Prerequisites
If you don't have the Angular CLI, install:
- npm i -g angular-cli@latest
+ npm i -g @angular/cli@latest
Install Typescript 2.0:
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index c9669790b..016bace37 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -1,3 +1,3 @@
-export const environment = {
+export const environment: {production: boolean} = {
production: true,
};
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index a20cfe557..6df83e00a 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -1,3 +1,3 @@
-export const environment = {
+export const environment: {production: boolean} = {
production: false,
};
diff --git a/src/main.ts b/src/main.ts
index 5c3c52040..8f155f413 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,3 @@
-import './polyfills.ts';
-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment';
diff --git a/src/platform/charts/package.json b/src/platform/charts/package.json
index baffb5d34..b29d7530c 100644
--- a/src/platform/charts/package.json
+++ b/src/platform/charts/package.json
@@ -12,7 +12,7 @@
"scripts": {
},
"engines": {
- "node": ">4.4 < 7",
+ "node": ">=6.9",
"npm": ">= 3"
},
"repository": {
diff --git a/src/platform/core/package.json b/src/platform/core/package.json
index 206e03309..5bdb047f4 100644
--- a/src/platform/core/package.json
+++ b/src/platform/core/package.json
@@ -13,7 +13,7 @@
"scripts": {
},
"engines": {
- "node": ">4.4 < 7",
+ "node": ">=6.9",
"npm": ">= 3"
},
"repository": {
diff --git a/src/platform/dynamic-forms/package.json b/src/platform/dynamic-forms/package.json
index 7f7a8bb52..75fd8a196 100644
--- a/src/platform/dynamic-forms/package.json
+++ b/src/platform/dynamic-forms/package.json
@@ -15,7 +15,7 @@
"scripts": {
},
"engines": {
- "node": ">4.4 < 7",
+ "node": ">=6.9",
"npm": ">= 3"
},
"repository": {
diff --git a/src/platform/highlight/package.json b/src/platform/highlight/package.json
index 2a54fcee8..c4ce5a381 100644
--- a/src/platform/highlight/package.json
+++ b/src/platform/highlight/package.json
@@ -15,7 +15,7 @@
"scripts": {
},
"engines": {
- "node": ">4.4 < 7",
+ "node": ">=6.9",
"npm": ">= 3"
},
"repository": {
diff --git a/src/platform/http/package.json b/src/platform/http/package.json
index 41a5f80f8..07948bbd3 100644
--- a/src/platform/http/package.json
+++ b/src/platform/http/package.json
@@ -16,7 +16,7 @@
"scripts": {
},
"engines": {
- "node": ">4.4 < 7",
+ "node": ">=6.9",
"npm": ">= 3"
},
"repository": {
diff --git a/src/platform/markdown/package.json b/src/platform/markdown/package.json
index 29d7c4992..ab6df6180 100644
--- a/src/platform/markdown/package.json
+++ b/src/platform/markdown/package.json
@@ -13,7 +13,7 @@
"scripts": {
},
"engines": {
- "node": ">4.4 < 7",
+ "node": ">=6.9",
"npm": ">= 3"
},
"repository": {
diff --git a/src/polyfills.ts b/src/polyfills.ts
index ebf7ac02a..3cf43c8c3 100644
--- a/src/polyfills.ts
+++ b/src/polyfills.ts
@@ -1,5 +1,5 @@
-// This file includes polyfills needed by Angular 2 and is loaded before
-// the app. You can add your own extra polyfills to this file.
+// This file includes polyfills needed by Angular and is loaded before the app.
+// You can add your own extra polyfills to this file.
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
@@ -19,3 +19,22 @@ import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'rxjs/Rx';
+
+// If you need to support the browsers/features below, uncomment the import
+// and run `npm install import-name-here';
+// Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
+
+// Needed for: IE9
+// import 'classlist.js';
+
+// Animations
+// Needed for: All but Chrome and Firefox, Not supported in IE9
+// import 'web-animations-js';
+
+// Date, currency, decimal and percent pipes
+// Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
+// import 'intl';
+
+// NgClass on SVG elements
+// Needed for: IE10, IE11
+// import 'classlist.js';
diff --git a/src/test.ts b/src/test.ts
index 23ed722f0..0ff5a902e 100644
--- a/src/test.ts
+++ b/src/test.ts
@@ -1,4 +1,4 @@
-import './polyfills.ts';
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/long-stack-trace-zone';
import 'zone.js/dist/proxy.js';
@@ -7,28 +7,27 @@ import 'zone.js/dist/jasmine-patch';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
import 'hammerjs';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting,
+} from '@angular/platform-browser-dynamic/testing';
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;
declare var require: any;
// Prevent Karma from running prematurely.
-__karma__.loaded = function (): void { /* noop */ };
+__karma__.loaded = function (): void {/* empty */};
-Promise.all([
- System.import('@angular/core/testing'),
- System.import('@angular/platform-browser-dynamic/testing'),
-])
- // First, initialize the Angular testing environment.
- .then(([testing, testingBrowser]: any[]) => {
- testing.getTestBed().initTestEnvironment(
- testingBrowser.BrowserDynamicTestingModule,
- testingBrowser.platformBrowserDynamicTesting(),
- );
- })
- // Then we find all the tests.
- .then(() => require.context('./', true, /\.spec\.ts/))
- // And load the modules.
- .then((context: any) => context.keys().map(context))
- // Finally, start Karma to run the tests.
- .then(__karma__.start, __karma__.error);
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting(),
+);
+// Then we find all the tests.
+const context: any = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
+// Finally, start Karma to run the tests.
+__karma__.start();