diff --git a/config/webpack.dev.js b/config/webpack.dev.js index 27e93b36..e5a8b1c5 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -141,7 +141,8 @@ module.exports = webpackMerge(commonConfig, { watchOptions: { aggregateTimeout: 300, poll: 1000 - } + }, + outputPath: helpers.root('dist') }, /* diff --git a/package.json b/package.json index c2b683c2..e2006211 100644 --- a/package.json +++ b/package.json @@ -6,31 +6,39 @@ "homepage": "", "license": "MIT", "dependencies": { + "@angular/http": "2.0.0-rc.1", + "@angular/common": "2.0.0-rc.1", + "@angular/compiler": "2.0.0-rc.1", + "@angular/core": "2.0.0-rc.1", + "@angular/platform-browser": "2.0.0-rc.1", + "@angular/platform-browser-dynamic": "2.0.0-rc.1", + "@angular/platform-server": "2.0.0-rc.1", + "@angular/router": "2.0.0-rc.1", + "@angular/router-deprecated": "2.0.0-rc.1", + "core-js": "^2.2.2", + "normalize.css": "^4.1.1", + "rxjs": "5.0.0-beta.6", + "zone.js": "~0.6.12", "amcharts3": "github:amcharts/amcharts3", "ammap3": "github:amcharts/ammap3", - "angular2": "2.0.0-beta.17", "bootstrap": "^4.0.0-alpha.2", "bootstrap-loader": "^1.0.8", "chartist": "^0.9.7", - "core-js": "^2.2.2", "easy-pie-chart": "^2.1.7", "font-awesome": "^4.6.1", "font-awesome-sass-loader": "^1.0.1", "google-maps": "^3.2.1", "jquery": "^2.2.3", "leaflet-map": "^0.2.1", - "ng2-charts": "^1.0.3", - "normalize.css": "^4.1.1", - "rxjs": "5.0.0-beta.6 ", "tether": "^1.2.4", - "zone.js": "~0.6.11" + "ng2-charts": "^1.0.3" }, "devDependencies": { - "angular2-hmr": "~0.5.5", - "awesome-typescript-loader": "~0.16.2", - "codelyzer": "0.0.12", + "angular2-hmr": "~0.6.0", + "awesome-typescript-loader": "~0.17.0", + "codelyzer": "~0.0.19", "compression-webpack-plugin": "^0.3.1", - "copy-webpack-plugin": "^1.1.1", + "copy-webpack-plugin": "^2.1.3", "css-loader": "^0.23.1", "es6-promise": "^3.1.2", "es6-promise-loader": "^1.0.1", @@ -44,29 +52,38 @@ "imports-loader": "^0.6.5", "istanbul-instrumenter-loader": "^0.2.0", "json-loader": "^0.5.4", - "node-sass": "^3.5.3", + "karma": "^0.13.22", + "karma-chrome-launcher": "^1.0.1", + "karma-coverage": "^1.0.0", + "karma-jasmine": "^1.0.2", + "karma-mocha-reporter": "^2.0.0", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-webpack": "1.7.0", "parse5": "^2.1.5", "phantomjs-polyfill": "0.0.2", "phantomjs-prebuilt": "^2.1.7", + "protractor": "^3.2.2", "raw-loader": "0.5.1", - "remap-istanbul": "^0.5.1", - "resolve-url-loader": "^1.4.3", + "remap-istanbul": "^0.6.3", "rimraf": "^2.5.2", - "sass-loader": "^3.2.0", "source-map-loader": "^0.1.5", "style-loader": "^0.13.1", - "ts-helpers": "1.1.0", + "ts-helpers": "1.1.1", "ts-node": "^0.7.1", "tslint": "^3.7.1", "tslint-loader": "^2.1.3", "typedoc": "^0.3.12", "typescript": "~1.8.9", - "typings": "^0.7.12", + "typings": "^0.8.1", "url-loader": "^0.5.7", "webpack": "^1.12.14", "webpack-dev-server": "^1.14.1", "webpack-md5-hash": "^0.0.5", - "webpack-merge": "^0.8.4" + "webpack-merge": "^0.12.0", + "node-sass": "^3.5.3", + "sass-loader": "^3.2.0", + "resolve-url-loader": "^1.4.3" }, "scripts": { "rimraf": "rimraf", @@ -76,35 +93,57 @@ "webpack": "webpack", "webpack-dev-server": "webpack-dev-server", "webdriver-manager": "webdriver-manager", + "protractor": "protractor", + "clean": "npm cache clean && npm run rimraf -- node_modules doc typings coverage dist", "clean:dist": "npm run rimraf -- dist", "preclean:install": "npm run clean", "clean:install": "npm set progress=false && npm install", "preclean:start": "npm run clean", "clean:start": "npm start", + "watch": "npm run watch:dev", "watch:dev": "npm run build:dev -- --watch", "watch:dev:hmr": "npm run watch:dev -- --hot", + "watch:test": "npm run test -- --auto-watch --no-single-run", "watch:prod": "npm run build:prod -- --watch", + "build": "npm run build:dev", "prebuild:dev": "npm run clean:dist", "build:dev": "webpack --config config/webpack.dev.js --progress --profile --colors --display-error-details --display-cached", "prebuild:prod": "npm run clean:dist", "build:prod": "webpack --config config/webpack.prod.js --progress --profile --colors --display-error-details --display-cached --bail", + "server": "npm run server:dev", "server:dev": "webpack-dev-server --config config/webpack.dev.js --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/", "server:dev:hmr": "npm run server:dev -- --hot", "server:prod": "http-server dist --cors", + "webdriver:update": "npm run webdriver-manager update", "webdriver:start": "npm run webdriver-manager start", + "lint": "npm run tslint 'src/**/*.ts'", + + "pree2e": "npm run webdriver:update -- --standalone", + "e2e": "npm run protractor", + "e2e:live": "npm run e2e -- --elementExplorer", + + "pretest": "npm run lint", + "test": "karma start", + + "ci": "npm test && npm run e2e", + "docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/", + "start": "npm run server:dev", "start:hmr": "npm run server:dev:hmr", - "postinstall": "npm run typings -- install && bower install", - "preversion": "npm run build", + + "postinstall": "npm run typings -- install", + + "preversion": "npm test", "version": "npm run build", "postversion": "git push && git push --tags" + }, "repository": { "type": "git", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 08cf4ec5..76be12e7 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,5 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; -import {RouteConfig, Router} from 'angular2/router'; +import {Component, ViewEncapsulation} from '@angular/core'; +import {RouteConfig, Router} from '@angular/router-deprecated'; import {Subscription} from 'rxjs/Subscription'; import {Pages} from './pages'; diff --git a/src/app/pages/charts/charts.component.ts b/src/app/pages/charts/charts.component.ts index 08c8f057..62cf1879 100644 --- a/src/app/pages/charts/charts.component.ts +++ b/src/app/pages/charts/charts.component.ts @@ -1,7 +1,7 @@ -import {Component} from 'angular2/core'; -import {RouteConfig} from 'angular2/router'; +import {Component} from '@angular/core'; +import {RouteConfig} from '@angular/router-deprecated'; -import {ChartJs} from "./components/chartJs"; +// import {ChartJs} from "./components/chartJs"; import {ChartistJs} from "./components/chartistJs/chartistJs.component"; @Component({ @@ -12,17 +12,17 @@ import {ChartistJs} from "./components/chartistJs/chartistJs.component"; template: `` }) @RouteConfig([ - { - name: 'ChartJs', - component: ChartJs, - path: '/chart-js', - useAsDefault: true, - }, { name: 'ChartistJs', component: ChartistJs, path: '/chartist-js', - } + useAsDefault: true, + }, + // { + // name: 'ChartJs', + // component: ChartJs, + // path: '/chart-js', + // }, ]) export class Charts { diff --git a/src/app/pages/charts/components/chartJs/chartJs.component.ts b/src/app/pages/charts/components/chartJs/chartJs.component.ts index b10b3672..86707e8c 100644 --- a/src/app/pages/charts/components/chartJs/chartJs.component.ts +++ b/src/app/pages/charts/components/chartJs/chartJs.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {BaCard} from '../../../../theme/components'; import {ChartJsService} from "./chartJs.service"; diff --git a/src/app/pages/charts/components/chartJs/chartJs.service.ts b/src/app/pages/charts/components/chartJs/chartJs.service.ts index f90c570d..d3dadb5a 100644 --- a/src/app/pages/charts/components/chartJs/chartJs.service.ts +++ b/src/app/pages/charts/components/chartJs/chartJs.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; @Injectable() export class ChartJsService { diff --git a/src/app/pages/charts/components/chartistJs/chartistJs.component.ts b/src/app/pages/charts/components/chartistJs/chartistJs.component.ts index 41845e1d..3d7efa97 100644 --- a/src/app/pages/charts/components/chartistJs/chartistJs.component.ts +++ b/src/app/pages/charts/components/chartistJs/chartistJs.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {BaCard} from '../../../../theme/components'; import {ChartistJsService} from "./chartistJs.service"; diff --git a/src/app/pages/charts/components/chartistJs/chartistJs.service.ts b/src/app/pages/charts/components/chartistJs/chartistJs.service.ts index 73c5539b..cc2f88c4 100644 --- a/src/app/pages/charts/components/chartistJs/chartistJs.service.ts +++ b/src/app/pages/charts/components/chartistJs/chartistJs.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; @Injectable() export class ChartistJsService { diff --git a/src/app/pages/dashboard/calendar/calendar.component.ts b/src/app/pages/dashboard/calendar/calendar.component.ts index bb380b7f..3aa48fe0 100644 --- a/src/app/pages/dashboard/calendar/calendar.component.ts +++ b/src/app/pages/dashboard/calendar/calendar.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import './calendar.loader.ts'; import {layoutColors} from "../../../theme/theme.constants"; diff --git a/src/app/pages/dashboard/dashboard.component.ts b/src/app/pages/dashboard/dashboard.component.ts index ed4f8e7a..aec92978 100644 --- a/src/app/pages/dashboard/dashboard.component.ts +++ b/src/app/pages/dashboard/dashboard.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {PopularApp} from './popularApp'; import {PieChart} from './pieChart'; diff --git a/src/app/pages/dashboard/feed/feed.component.ts b/src/app/pages/dashboard/feed/feed.component.ts index af33a20b..d92fc15d 100644 --- a/src/app/pages/dashboard/feed/feed.component.ts +++ b/src/app/pages/dashboard/feed/feed.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {ProfilePicturePipe, AppPicturePipe} from '../../../theme/pipes'; import {FeedService} from './feed.service'; diff --git a/src/app/pages/dashboard/feed/feed.service.ts b/src/app/pages/dashboard/feed/feed.service.ts index 9047b9cf..a9204db6 100644 --- a/src/app/pages/dashboard/feed/feed.service.ts +++ b/src/app/pages/dashboard/feed/feed.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; @Injectable() export class FeedService { diff --git a/src/app/pages/dashboard/lineChart/lineChart.component.ts b/src/app/pages/dashboard/lineChart/lineChart.component.ts index cc0d23c1..540cf438 100644 --- a/src/app/pages/dashboard/lineChart/lineChart.component.ts +++ b/src/app/pages/dashboard/lineChart/lineChart.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {LineChartService} from './lineChart.service'; import {BaAmChart} from '../../../theme/components'; diff --git a/src/app/pages/dashboard/lineChart/lineChart.service.ts b/src/app/pages/dashboard/lineChart/lineChart.service.ts index dc72d2aa..428f75dc 100644 --- a/src/app/pages/dashboard/lineChart/lineChart.service.ts +++ b/src/app/pages/dashboard/lineChart/lineChart.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; import {layoutColors, layoutPaths} from '../../../theme'; @Injectable() diff --git a/src/app/pages/dashboard/pieChart/pieChart.component.ts b/src/app/pages/dashboard/pieChart/pieChart.component.ts index a7f7fcca..6e23a641 100644 --- a/src/app/pages/dashboard/pieChart/pieChart.component.ts +++ b/src/app/pages/dashboard/pieChart/pieChart.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {BaCard} from '../../../theme/components'; import {PieChartService} from './pieChart.service'; diff --git a/src/app/pages/dashboard/pieChart/pieChart.service.ts b/src/app/pages/dashboard/pieChart/pieChart.service.ts index a3acc1e5..b5f77697 100644 --- a/src/app/pages/dashboard/pieChart/pieChart.service.ts +++ b/src/app/pages/dashboard/pieChart/pieChart.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; @Injectable() export class PieChartService { diff --git a/src/app/pages/dashboard/popularApp/popularApp.component.ts b/src/app/pages/dashboard/popularApp/popularApp.component.ts index 40d8a226..a6899048 100644 --- a/src/app/pages/dashboard/popularApp/popularApp.component.ts +++ b/src/app/pages/dashboard/popularApp/popularApp.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {AppPicturePipe} from '../../../theme/pipes'; diff --git a/src/app/pages/dashboard/todo/todo.component.ts b/src/app/pages/dashboard/todo/todo.component.ts index fad5b7a6..6fb9818f 100644 --- a/src/app/pages/dashboard/todo/todo.component.ts +++ b/src/app/pages/dashboard/todo/todo.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {TodoService} from './todo.service'; diff --git a/src/app/pages/dashboard/todo/todo.service.ts b/src/app/pages/dashboard/todo/todo.service.ts index 967d6bb5..d2ec9115 100644 --- a/src/app/pages/dashboard/todo/todo.service.ts +++ b/src/app/pages/dashboard/todo/todo.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; @Injectable() export class TodoService { diff --git a/src/app/pages/dashboard/trafficChart/trafficChart.component.ts b/src/app/pages/dashboard/trafficChart/trafficChart.component.ts index 64155888..0544c6da 100644 --- a/src/app/pages/dashboard/trafficChart/trafficChart.component.ts +++ b/src/app/pages/dashboard/trafficChart/trafficChart.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation, ElementRef} from 'angular2/core'; +import {Component, ViewEncapsulation, ElementRef} from '@angular/core'; import './trafficChart.loader.ts'; import {TrafficChartService} from './trafficChart.service'; diff --git a/src/app/pages/dashboard/trafficChart/trafficChart.service.ts b/src/app/pages/dashboard/trafficChart/trafficChart.service.ts index 4607ffea..8472188a 100644 --- a/src/app/pages/dashboard/trafficChart/trafficChart.service.ts +++ b/src/app/pages/dashboard/trafficChart/trafficChart.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; import {layoutColors} from '../../../theme'; @Injectable() diff --git a/src/app/pages/dashboard/usersMap/usersMap.component.ts b/src/app/pages/dashboard/usersMap/usersMap.component.ts index d03d83b7..d116b97f 100644 --- a/src/app/pages/dashboard/usersMap/usersMap.component.ts +++ b/src/app/pages/dashboard/usersMap/usersMap.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {UsersMapService} from './usersMap.service'; import {BaAmChart} from '../../../theme/components'; diff --git a/src/app/pages/dashboard/usersMap/usersMap.service.ts b/src/app/pages/dashboard/usersMap/usersMap.service.ts index 7db45627..ea1856bd 100644 --- a/src/app/pages/dashboard/usersMap/usersMap.service.ts +++ b/src/app/pages/dashboard/usersMap/usersMap.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; import {layoutColors, layoutPaths} from '../../../theme'; @Injectable() diff --git a/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts b/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts index 3598d181..bd2976fe 100644 --- a/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts +++ b/src/app/pages/maps/components/bubbleMaps/bubbleMaps.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {BaCard} from '../../../../theme/components'; import {layoutPaths} from "../../../../theme/theme.constants"; diff --git a/src/app/pages/maps/components/bubbleMaps/bubbleMaps.service.ts b/src/app/pages/maps/components/bubbleMaps/bubbleMaps.service.ts index 5f84631a..7c8ae94c 100644 --- a/src/app/pages/maps/components/bubbleMaps/bubbleMaps.service.ts +++ b/src/app/pages/maps/components/bubbleMaps/bubbleMaps.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; import {layoutColors} from "../../../../theme/theme.constants"; @Injectable() diff --git a/src/app/pages/maps/components/googleMaps/googleMaps.component.ts b/src/app/pages/maps/components/googleMaps/googleMaps.component.ts index f86836d3..21bf8bb9 100644 --- a/src/app/pages/maps/components/googleMaps/googleMaps.component.ts +++ b/src/app/pages/maps/components/googleMaps/googleMaps.component.ts @@ -1,6 +1,5 @@ -import {Component, ViewEncapsulation, ElementRef} from 'angular2/core'; +import {Component, ViewEncapsulation, ElementRef} from '@angular/core'; import {BaCard} from '../../../../theme/components'; -import {DOM} from "angular2/src/platform/dom/dom_adapter"; @Component({ selector: 'google-maps', @@ -16,7 +15,7 @@ export class GoogleMaps { } ngAfterViewInit() { - let el = DOM.querySelector(this._elementRef.nativeElement, '.google-maps'); + let el = this._elementRef.nativeElement.querySelector('.google-maps'); // TODO: do not load this each time as we already have the library after first attempt GoogleMapsLoader.load((google) => { diff --git a/src/app/pages/maps/components/leafletMaps/leafletMaps.component.ts b/src/app/pages/maps/components/leafletMaps/leafletMaps.component.ts index 08a6c5a6..13a49dc0 100644 --- a/src/app/pages/maps/components/leafletMaps/leafletMaps.component.ts +++ b/src/app/pages/maps/components/leafletMaps/leafletMaps.component.ts @@ -1,6 +1,5 @@ -import {Component, ViewEncapsulation, ElementRef} from 'angular2/core'; +import {Component, ViewEncapsulation, ElementRef} from '@angular/core'; import {BaCard} from '../../../../theme/components'; -import {DOM} from "angular2/src/platform/dom/dom_adapter"; @Component({ selector: 'leaflet-maps', @@ -18,7 +17,7 @@ export class LeafletMaps { } ngAfterViewInit() { - let el = DOM.querySelector(this._elementRef.nativeElement, '.leaflet-maps'); + let el = this._elementRef.nativeElement.querySelector('.leaflet-maps'); L.Icon.Default.imagePath = 'assets/img/theme/vendor/leaflet'; var map = L.map(el).setView([51.505, -0.09], 13); diff --git a/src/app/pages/maps/components/lineMaps/lineMaps.component.ts b/src/app/pages/maps/components/lineMaps/lineMaps.component.ts index 35d1491a..1d7f8ae9 100644 --- a/src/app/pages/maps/components/lineMaps/lineMaps.component.ts +++ b/src/app/pages/maps/components/lineMaps/lineMaps.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {BaCard} from '../../../../theme/components'; import {layoutColors, layoutPaths} from "../../../../theme/theme.constants"; diff --git a/src/app/pages/maps/components/lineMaps/lineMaps.service.ts b/src/app/pages/maps/components/lineMaps/lineMaps.service.ts index 2e0cd6fc..93dcd8ef 100644 --- a/src/app/pages/maps/components/lineMaps/lineMaps.service.ts +++ b/src/app/pages/maps/components/lineMaps/lineMaps.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; import {layoutColors} from "../../../../theme/theme.constants"; @Injectable() diff --git a/src/app/pages/maps/maps.component.ts b/src/app/pages/maps/maps.component.ts index d9845f53..cc890fd8 100644 --- a/src/app/pages/maps/maps.component.ts +++ b/src/app/pages/maps/maps.component.ts @@ -1,5 +1,5 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; -import {RouteConfig} from 'angular2/router'; +import {Component, ViewEncapsulation} from '@angular/core'; +import {RouteConfig} from '@angular/router-deprecated'; import {GoogleMaps} from './components/googleMaps'; import {LeafletMaps} from "./components/leafletMaps"; diff --git a/src/app/pages/pages.component.ts b/src/app/pages/pages.component.ts index a00e46c7..992c0d5a 100644 --- a/src/app/pages/pages.component.ts +++ b/src/app/pages/pages.component.ts @@ -1,5 +1,5 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; -import {RouteConfig} from 'angular2/router'; +import {Component, ViewEncapsulation} from '@angular/core'; +import {RouteConfig} from '@angular/router-deprecated'; import {PageTop, ContentTop, Sidebar} from '../theme/components'; diff --git a/src/app/pages/ui/components/typography/typography.component.ts b/src/app/pages/ui/components/typography/typography.component.ts index c4697816..19817d45 100644 --- a/src/app/pages/ui/components/typography/typography.component.ts +++ b/src/app/pages/ui/components/typography/typography.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; +import {Component, ViewEncapsulation} from '@angular/core'; @Component({ selector: 'typography', diff --git a/src/app/pages/ui/ui.component.ts b/src/app/pages/ui/ui.component.ts index 1fd7185a..d2dfac3b 100644 --- a/src/app/pages/ui/ui.component.ts +++ b/src/app/pages/ui/ui.component.ts @@ -1,5 +1,5 @@ -import {Component, ViewEncapsulation} from 'angular2/core'; -import {RouteConfig} from 'angular2/router'; +import {Component, ViewEncapsulation} from '@angular/core'; +import {RouteConfig} from '@angular/router-deprecated'; import {Typography} from './components/typography'; diff --git a/src/app/theme/components/baAmChart/baAmChart.component.ts b/src/app/theme/components/baAmChart/baAmChart.component.ts index 33bf16a4..ebf6edf1 100644 --- a/src/app/theme/components/baAmChart/baAmChart.component.ts +++ b/src/app/theme/components/baAmChart/baAmChart.component.ts @@ -1,7 +1,6 @@ -import {Component, ViewEncapsulation, Input, Output, ElementRef, EventEmitter} from 'angular2/core'; +import {Component, ViewEncapsulation, Input, Output, ElementRef, EventEmitter} from '@angular/core'; import './baAmChart.loader.ts'; -import {DOM} from "angular2/src/platform/dom/dom_adapter"; import {BaAmChartThemeService} from './baAmChartTheme.service'; @Component({ @@ -25,7 +24,7 @@ export class BaAmChart { } ngAfterViewInit() { - let el = DOM.querySelector(this._elementRef.nativeElement, '.ba-am-chart'); + let el = this._elementRef.nativeElement.querySelector('.ba-am-chart'); let chart = AmCharts.makeChart(el, this.baAmChartConfiguration); this.onChartReady.emit(chart); diff --git a/src/app/theme/components/baAmChart/baAmChartTheme.service.ts b/src/app/theme/components/baAmChart/baAmChartTheme.service.ts index 09528951..3a33503d 100644 --- a/src/app/theme/components/baAmChart/baAmChartTheme.service.ts +++ b/src/app/theme/components/baAmChart/baAmChartTheme.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; import {layoutColors} from '../../../theme/theme.constants'; diff --git a/src/app/theme/components/baCard/baCard.component.ts b/src/app/theme/components/baCard/baCard.component.ts index 2665eab9..8c700c08 100644 --- a/src/app/theme/components/baCard/baCard.component.ts +++ b/src/app/theme/components/baCard/baCard.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewEncapsulation, Input} from 'angular2/core'; +import {Component, ViewEncapsulation, Input} from '@angular/core'; import {BaCardBlur} from './baCardBlur.directive'; diff --git a/src/app/theme/components/baCard/baCardBlur.directive.ts b/src/app/theme/components/baCard/baCardBlur.directive.ts index bbdf3cb2..beaf9a6f 100644 --- a/src/app/theme/components/baCard/baCardBlur.directive.ts +++ b/src/app/theme/components/baCard/baCardBlur.directive.ts @@ -1,4 +1,4 @@ -import {Directive, ElementRef, HostListener} from 'angular2/core'; +import {Directive, ElementRef, HostListener} from '@angular/core'; import {BaCardBlurHelper} from './baCardBlurHelper.service'; import {BgMetrics} from './bgMetrics'; diff --git a/src/app/theme/components/baCard/baCardBlurHelper.service.ts b/src/app/theme/components/baCard/baCardBlurHelper.service.ts index 2893f7f1..efed5e32 100644 --- a/src/app/theme/components/baCard/baCardBlurHelper.service.ts +++ b/src/app/theme/components/baCard/baCardBlurHelper.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core' +import {Injectable} from '@angular/core' import {BgMetrics} from './bgMetrics'; import {Subject} from 'rxjs/Subject'; diff --git a/src/app/theme/components/contentTop/contentTop.component.ts b/src/app/theme/components/contentTop/contentTop.component.ts index 03ef0d1a..cce22b48 100644 --- a/src/app/theme/components/contentTop/contentTop.component.ts +++ b/src/app/theme/components/contentTop/contentTop.component.ts @@ -1,4 +1,4 @@ -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {Subscription} from "rxjs/Subscription"; import {ThemeGlobal} from "../../../theme"; diff --git a/src/app/theme/components/msgCenter/msgCenter.component.ts b/src/app/theme/components/msgCenter/msgCenter.component.ts index 2477cb77..1c30a2a3 100644 --- a/src/app/theme/components/msgCenter/msgCenter.component.ts +++ b/src/app/theme/components/msgCenter/msgCenter.component.ts @@ -1,4 +1,4 @@ -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {ProfilePicturePipe} from '../../pipes'; diff --git a/src/app/theme/components/pageTop/pageTop.component.ts b/src/app/theme/components/pageTop/pageTop.component.ts index e2dda0ae..776e0037 100644 --- a/src/app/theme/components/pageTop/pageTop.component.ts +++ b/src/app/theme/components/pageTop/pageTop.component.ts @@ -1,4 +1,4 @@ -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {ThemeGlobal} from '../../../theme'; import {ProfilePicturePipe} from '../../pipes'; diff --git a/src/app/theme/components/sidebar/sidebar.component.ts b/src/app/theme/components/sidebar/sidebar.component.ts index af1ce1b6..986cda0b 100644 --- a/src/app/theme/components/sidebar/sidebar.component.ts +++ b/src/app/theme/components/sidebar/sidebar.component.ts @@ -1,5 +1,5 @@ -import {Component, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core'; -import {Router} from 'angular2/router'; +import {Component, ElementRef, HostListener, ViewEncapsulation} from '@angular/core'; +import {Router} from '@angular/router-deprecated'; import {ThemeGlobal, layoutSizes} from '../../../theme'; import {SidebarService} from './sidebar.service'; diff --git a/src/app/theme/components/sidebar/sidebar.service.ts b/src/app/theme/components/sidebar/sidebar.service.ts index 6c4cdf34..c172633c 100644 --- a/src/app/theme/components/sidebar/sidebar.service.ts +++ b/src/app/theme/components/sidebar/sidebar.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core'; +import {Injectable} from '@angular/core'; @Injectable() export class SidebarService { @@ -60,10 +60,10 @@ export class SidebarService { expanded: false, order: 400, subMenu: [ - { - title: 'Chart Js', - name: 'ChartJs', - }, + // { + // title: 'Chart Js', + // name: 'ChartJs', + // }, { title: 'ChartistJs', name: 'ChartistJs', diff --git a/src/app/theme/directives/scrollPosition/scrollPosition.directive.ts b/src/app/theme/directives/scrollPosition/scrollPosition.directive.ts index e39365a3..b8173b09 100644 --- a/src/app/theme/directives/scrollPosition/scrollPosition.directive.ts +++ b/src/app/theme/directives/scrollPosition/scrollPosition.directive.ts @@ -1,4 +1,4 @@ -import {Directive, Input, Output, EventEmitter, HostListener} from 'angular2/core'; +import {Directive, Input, Output, EventEmitter, HostListener} from '@angular/core'; @Directive({ selector: '[scrollPosition]' diff --git a/src/app/theme/pipes/appPicture/appPicture.pipe.ts b/src/app/theme/pipes/appPicture/appPicture.pipe.ts index d25b1039..1b4f2a15 100644 --- a/src/app/theme/pipes/appPicture/appPicture.pipe.ts +++ b/src/app/theme/pipes/appPicture/appPicture.pipe.ts @@ -1,4 +1,4 @@ -import {Pipe, PipeTransform} from 'angular2/core'; +import {Pipe, PipeTransform} from '@angular/core'; import {layoutPaths} from '../../../theme'; @Pipe({name: 'appPicture'}) diff --git a/src/app/theme/pipes/profilePicture/profilePicture.pipe.ts b/src/app/theme/pipes/profilePicture/profilePicture.pipe.ts index 5510555b..828da945 100644 --- a/src/app/theme/pipes/profilePicture/profilePicture.pipe.ts +++ b/src/app/theme/pipes/profilePicture/profilePicture.pipe.ts @@ -1,4 +1,4 @@ -import {Pipe, PipeTransform} from 'angular2/core'; +import {Pipe, PipeTransform} from '@angular/core'; import {layoutPaths} from '../../../theme'; @Pipe({name: 'profilePicture'}) diff --git a/src/app/theme/theme.global.ts b/src/app/theme/theme.global.ts index 013c4d74..75587f1e 100644 --- a/src/app/theme/theme.global.ts +++ b/src/app/theme/theme.global.ts @@ -1,4 +1,4 @@ -import {Injectable} from 'angular2/core' +import {Injectable} from '@angular/core' import {Subject} from 'rxjs/Subject'; @Injectable() diff --git a/src/main.browser.ts b/src/main.browser.ts index c2e9ec3c..657cafc7 100644 --- a/src/main.browser.ts +++ b/src/main.browser.ts @@ -1,7 +1,7 @@ /* * Providers provided by Angular */ -import {bootstrap} from 'angular2/platform/browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; /* * Platform and Environment * our providers/directives/pipes diff --git a/src/platform/browser/directives.ts b/src/platform/browser/directives.ts index 271007f8..7693bb4b 100644 --- a/src/platform/browser/directives.ts +++ b/src/platform/browser/directives.ts @@ -2,10 +2,10 @@ * These are globally available directives in any template */ -import {provide, PLATFORM_DIRECTIVES} from 'angular2/core'; +import {PLATFORM_DIRECTIVES} from '@angular/core'; // Angular 2 Router -import {ROUTER_DIRECTIVES} from 'angular2/router'; +import {ROUTER_DIRECTIVES} from '@angular/router-deprecated'; // application_directives: directives that are global through out the application export const APPLICATION_DIRECTIVES = [ @@ -13,5 +13,5 @@ export const APPLICATION_DIRECTIVES = [ ]; export const DIRECTIVES = [ - provide(PLATFORM_DIRECTIVES, { multi: true, useValue: APPLICATION_DIRECTIVES }) + {provide: PLATFORM_DIRECTIVES, multi: true, useValue: APPLICATION_DIRECTIVES } ]; diff --git a/src/platform/browser/pipes.ts b/src/platform/browser/pipes.ts index abe058d5..bb9c3806 100644 --- a/src/platform/browser/pipes.ts +++ b/src/platform/browser/pipes.ts @@ -2,7 +2,7 @@ * These are globally available pipes in any template */ -import {provide, PLATFORM_PIPES} from 'angular2/core'; +import {PLATFORM_PIPES} from '@angular/core'; // application_pipes: pipes that are global through out the application export const APPLICATION_PIPES = [ @@ -10,5 +10,5 @@ export const APPLICATION_PIPES = [ ]; export const PIPES = [ - provide(PLATFORM_PIPES, { multi: true, useValue: APPLICATION_PIPES }) + {provide: PLATFORM_PIPES, multi: true, useValue: APPLICATION_PIPES } ]; diff --git a/src/platform/browser/providers.ts b/src/platform/browser/providers.ts index 3161d0b4..9027794d 100644 --- a/src/platform/browser/providers.ts +++ b/src/platform/browser/providers.ts @@ -2,18 +2,13 @@ * 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'; +import {FORM_PROVIDERS, LocationStrategy, HashLocationStrategy} from '@angular/common'; // Angular 2 Http -import {HTTP_PROVIDERS} from 'angular2/http'; +import {HTTP_PROVIDERS} from '@angular/http'; // Angular 2 Router -import {ROUTER_PROVIDERS} from 'angular2/router'; - -import {LocationStrategy, PathLocationStrategy} from 'angular2/platform/common' +import {ROUTER_PROVIDERS} from '@angular/router-deprecated'; /* * Application Providers/Directives/Pipes @@ -23,7 +18,7 @@ export const APPLICATION_PROVIDERS = [ ...FORM_PROVIDERS, ...HTTP_PROVIDERS, ...ROUTER_PROVIDERS, - provide(LocationStrategy, { useClass: PathLocationStrategy }) + {provide: LocationStrategy, useClass: HashLocationStrategy } ]; export const PROVIDERS = [ diff --git a/src/platform/environment.ts b/src/platform/environment.ts index 9de51101..252bc2ac 100644 --- a/src/platform/environment.ts +++ b/src/platform/environment.ts @@ -1,11 +1,5 @@ -// Angular 2 browser -import { - ELEMENT_PROBE_PROVIDERS, - ELEMENT_PROBE_PROVIDERS_PROD_MODE -} from 'angular2/platform/browser'; - // Angular 2 -import {enableProdMode} from 'angular2/core'; +import {enableProdMode} from '@angular/core'; // Environment Providers let PROVIDERS = []; @@ -15,15 +9,13 @@ if ('production' === ENV) { enableProdMode(); PROVIDERS = [ - ...PROVIDERS, - ELEMENT_PROBE_PROVIDERS_PROD_MODE + ...PROVIDERS ]; } else { // Development PROVIDERS = [ - ...PROVIDERS, - ELEMENT_PROBE_PROVIDERS + ...PROVIDERS ]; } diff --git a/src/vendor.ts b/src/vendor.ts index acc16373..80b9ae9d 100644 --- a/src/vendor.ts +++ b/src/vendor.ts @@ -4,12 +4,12 @@ // run `typings install x` where `x` is your module // Angular 2 -import 'angular2/platform/browser'; -import 'angular2/platform/common_dom'; -import 'angular2/core'; -import 'angular2/common'; -import 'angular2/http'; -import 'angular2/router'; +import '@angular/platform-browser'; +import '@angular/platform-browser-dynamic'; +import '@angular/core'; +import '@angular/common'; +import '@angular/http'; +import '@angular/router-deprecated'; // RxJS import 'rxjs/add/operator/map';