angular updated to rc1

This commit is contained in:
nixa 2016-05-11 17:38:01 +03:00
parent 61d86e7e3d
commit 0dfcf86787
53 changed files with 145 additions and 121 deletions

View file

@ -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';

View file

@ -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 {

View file

@ -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";

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
@Injectable()
export class ChartJsService {

View file

@ -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";

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
@Injectable()
export class ChartistJsService {

View file

@ -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";

View file

@ -1,4 +1,4 @@
import {Component, ViewEncapsulation} from 'angular2/core';
import {Component, ViewEncapsulation} from '@angular/core';
import {PopularApp} from './popularApp';
import {PieChart} from './pieChart';

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
@Injectable()
export class FeedService {

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {layoutColors, layoutPaths} from '../../../theme';
@Injectable()

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
@Injectable()
export class PieChartService {

View file

@ -1,4 +1,4 @@
import {Component, ViewEncapsulation} from 'angular2/core';
import {Component, ViewEncapsulation} from '@angular/core';
import {AppPicturePipe} from '../../../theme/pipes';

View file

@ -1,4 +1,4 @@
import {Component, ViewEncapsulation} from 'angular2/core';
import {Component, ViewEncapsulation} from '@angular/core';
import {TodoService} from './todo.service';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
@Injectable()
export class TodoService {

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {layoutColors} from '../../../theme';
@Injectable()

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {layoutColors, layoutPaths} from '../../../theme';
@Injectable()

View file

@ -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";

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {layoutColors} from "../../../../theme/theme.constants";
@Injectable()

View file

@ -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) => {

View file

@ -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);

View file

@ -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";

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {layoutColors} from "../../../../theme/theme.constants";
@Injectable()

View file

@ -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";

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Component, ViewEncapsulation} from 'angular2/core';
import {Component, ViewEncapsulation} from '@angular/core';
@Component({
selector: 'typography',

View file

@ -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';

View file

@ -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);

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {layoutColors} from '../../../theme/theme.constants';

View file

@ -1,4 +1,4 @@
import {Component, ViewEncapsulation, Input} from 'angular2/core';
import {Component, ViewEncapsulation, Input} from '@angular/core';
import {BaCardBlur} from './baCardBlur.directive';

View file

@ -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';

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core'
import {Injectable} from '@angular/core'
import {BgMetrics} from './bgMetrics';
import {Subject} from 'rxjs/Subject';

View file

@ -1,4 +1,4 @@
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {Subscription} from "rxjs/Subscription";
import {ThemeGlobal} from "../../../theme";

View file

@ -1,4 +1,4 @@
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {ProfilePicturePipe} from '../../pipes';

View file

@ -1,4 +1,4 @@
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {ThemeGlobal} from '../../../theme';
import {ProfilePicturePipe} from '../../pipes';

View file

@ -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';

View file

@ -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',

View file

@ -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]'

View file

@ -1,4 +1,4 @@
import {Pipe, PipeTransform} from 'angular2/core';
import {Pipe, PipeTransform} from '@angular/core';
import {layoutPaths} from '../../../theme';
@Pipe({name: 'appPicture'})

View file

@ -1,4 +1,4 @@
import {Pipe, PipeTransform} from 'angular2/core';
import {Pipe, PipeTransform} from '@angular/core';
import {layoutPaths} from '../../../theme';
@Pipe({name: 'profilePicture'})

View file

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core'
import {Injectable} from '@angular/core'
import {Subject} from 'rxjs/Subject';
@Injectable()

View file

@ -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

View file

@ -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 }
];

View file

@ -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 }
];

View file

@ -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 = [

View file

@ -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
];
}

View file

@ -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';