mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-08 18:48:50 +01:00
angular updated to rc1
This commit is contained in:
parent
61d86e7e3d
commit
0dfcf86787
53 changed files with 145 additions and 121 deletions
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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: `<router-outlet></router-outlet>`
|
||||
})
|
||||
@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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class ChartJsService {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class ChartistJsService {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {PopularApp} from './popularApp';
|
||||
import {PieChart} from './pieChart';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class FeedService {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {layoutColors, layoutPaths} from '../../../theme';
|
||||
|
||||
@Injectable()
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class PieChartService {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {AppPicturePipe} from '../../../theme/pipes';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {TodoService} from './todo.service';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class TodoService {
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {layoutColors} from '../../../theme';
|
||||
|
||||
@Injectable()
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {layoutColors, layoutPaths} from '../../../theme';
|
||||
|
||||
@Injectable()
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {layoutColors} from "../../../../theme/theme.constants";
|
||||
|
||||
@Injectable()
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {layoutColors} from "../../../../theme/theme.constants";
|
||||
|
||||
@Injectable()
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ViewEncapsulation} from 'angular2/core';
|
||||
import {Component, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'typography',
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
import {layoutColors} from '../../../theme/theme.constants';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, ViewEncapsulation, Input} from 'angular2/core';
|
||||
import {Component, ViewEncapsulation, Input} from '@angular/core';
|
||||
|
||||
import {BaCardBlur} from './baCardBlur.directive';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core'
|
||||
import {Injectable} from '@angular/core'
|
||||
import {BgMetrics} from './bgMetrics';
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component} from 'angular2/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {Subscription} from "rxjs/Subscription";
|
||||
|
||||
import {ThemeGlobal} from "../../../theme";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component} from 'angular2/core';
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
import {ProfilePicturePipe} from '../../pipes';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Component} from 'angular2/core';
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
import {ThemeGlobal} from '../../../theme';
|
||||
import {ProfilePicturePipe} from '../../pipes';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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]'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Pipe, PipeTransform} from 'angular2/core';
|
||||
import {Pipe, PipeTransform} from '@angular/core';
|
||||
import {layoutPaths} from '../../../theme';
|
||||
|
||||
@Pipe({name: 'appPicture'})
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Pipe, PipeTransform} from 'angular2/core';
|
||||
import {Pipe, PipeTransform} from '@angular/core';
|
||||
import {layoutPaths} from '../../../theme';
|
||||
|
||||
@Pipe({name: 'profilePicture'})
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {Injectable} from 'angular2/core'
|
||||
import {Injectable} from '@angular/core'
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
|
||||
@Injectable()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue