Skip to content
Snippets Groups Projects
Commit 448f43a2 authored by francois.grand's avatar francois.grand
Browse files

- MAJ en typescript 2.6.1/Angular 5.0.2

- suppression des dépendances inutilisées
parent 542f259b
No related branches found
No related tags found
No related merge requests found
......@@ -24,42 +24,28 @@
"author": "",
"license": "MIT",
"dependencies": {
"@angular/animations": "4.2.5",
"@angular/common": "4.2.5",
"@angular/compiler": "4.2.5",
"@angular/compiler-cli": "4.2.5",
"@angular/core": "4.2.5",
"@angular/forms": "4.2.5",
"@angular/http": "4.2.5",
"@angular/material": "2.0.0-beta.7",
"@angular/platform-browser": "4.2.5",
"@angular/platform-browser-dynamic": "4.2.5",
"@angular/router": "4.2.5",
"@angular/platform-server": "4.2.5",
"systemjs": "0.19.40",
"core-js": "2.4.1",
"rxjs": "5.0.1",
"zone.js": "0.8.4",
"angular2-chartjs": "0.3.0",
"jalhyd": "1.0.0"
"@angular/animations": "5.0.2",
"@angular/common": "5.0.2",
"@angular/compiler": "5.0.2",
"@angular/core": "5.0.2",
"@angular/forms": "5.0.2",
"@angular/http": "5.0.2",
"@angular/platform-browser": "5.0.2",
"@angular/platform-browser-dynamic": "5.0.2",
"@angular/router": "5.0.2",
"angular2-chartjs": "0.4.1",
"core-js": "2.5.1",
"jalhyd": "file:../jalhyd/jalhyd-1.0.0.tgz",
"rxjs": "5.5.2",
"systemjs": "0.20.19",
"zone.js": "0.8.18"
},
"devDependencies": {
"concurrently": "3.2.0",
"lite-server": "2.2.2",
"typescript": "2.2.2",
"canonical-path": "0.0.2",
"tslint": "3.15.1",
"lodash": "4.16.4",
"jasmine-core": "2.4.1",
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-jasmine": "1.0.2",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "4.0.14",
"rimraf": "2.5.4",
"@types/node": "6.0.46",
"@types/jasmine": "2.5.36"
"concurrently": "3.5.0",
"lite-server": "2.3.0",
"typescript": "2.6.1",
"tslint": "5.8.0",
"@types/node": "8.0.53"
},
"repository": {}
}
import { Component, ChangeDetectorRef, ApplicationRef, AfterViewChecked } from '@angular/core';
import { MdDialog } from '@angular/material';
//import { MdDialog } from '@angular/material';
import { ParamService } from './services/param/param.service';
import { HttpService } from './services/http/http.service';
import { InternationalisationService, Language, LanguageCode } from './services/internationalisation/internationalisation.service';
import { Observer } from './services/observer';
import { ErrorService } from './services/error/error.service';
import { AlertDialog } from './components/alert-dialog/alert-dialog.component';
// import { AlertDialog } from './components/alert-dialog/alert-dialog.component';
import { FormulaireService } from './services/formulaire/formulaire.service';
@Component({
......@@ -38,7 +38,8 @@ export class AppComponent implements Observer {
private _displayErrorDialog: boolean = false;
constructor(private intlService: InternationalisationService, private appRef: ApplicationRef, private dialog: MdDialog, private errorService: ErrorService) { }
// constructor(private intlService: InternationalisationService, private appRef: ApplicationRef, private dialog: MdDialog, private errorService: ErrorService) { }
constructor(private intlService: InternationalisationService, private appRef: ApplicationRef, private errorService: ErrorService) { }
private initLocale() {
let docLocale: string = document['locale'] as string;
......@@ -78,12 +79,12 @@ export class AppComponent implements Observer {
update(data: any): void {
// on ouvre un dialogue avec le message d'erreur reçu
if (this._displayErrorDialog) {
let dialogRef = this.dialog.open(AlertDialog);
let ad: AlertDialog = dialogRef.componentInstance;
ad.text = String(data);
}
else
console.log(data);
// if (this._displayErrorDialog) {
// let dialogRef = this.dialog.open(AlertDialog);
// let ad: AlertDialog = dialogRef.componentInstance;
// ad.text = String(data);
// }
// else
console.log(data);
}
}
......@@ -3,7 +3,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms'; // <-- NgModel lives here
import { MdInputModule, MdDialogModule } from '@angular/material';
//import { MdInputModule, MdDialogModule } from '@angular/material';
import { ChartModule } from 'angular2-chartjs';
import { AppComponent } from './app.component';
......@@ -17,7 +17,7 @@ import { LechaptCalmonComponent } from './calculators/lechapt-calmon/lechaptcalm
import { SectionParametreeComponent } from './calculators/section-param/section-param.component';
import { RegimeUniformeComponent } from './calculators/regime-uniforme/regime-uniforme.component';
import { CourbeRemousComponent } from './calculators/remous/remous.component';
import { AlertDialog } from './components/alert-dialog/alert-dialog.component';
// import { AlertDialog } from './components/alert-dialog/alert-dialog.component';
import { AppErrorModule } from './error.module';
import { CalculatorResultsComponent } from './components/calculator-results/calculator-results.component';
import { SectionResultsComponent } from './components/section-results/section-results.component';
......@@ -31,9 +31,9 @@ import { RemousResultsComponent } from './components/remous-results/remous-resul
BrowserModule,
BrowserAnimationsModule,
FormsModule, // <-- import the FormsModule before binding with [(ngModel)]
MdInputModule,
HttpModule,
MdDialogModule,
// MdInputModule,
// MdDialogModule,
ChartModule,
AppErrorModule
],
......@@ -43,11 +43,11 @@ import { RemousResultsComponent } from './components/remous-results/remous-resul
FieldSetComponent,
ParamFieldLineComponent, SelectFieldLineComponent, CheckFieldLineComponent,
CondDistriComponent, LechaptCalmonComponent, SectionParametreeComponent, GenericCalculatorComponent, RegimeUniformeComponent, CourbeRemousComponent,
AlertDialog,
// AlertDialog,
CalculatorResultsComponent, SectionResultsComponent, RemousResultsComponent,
CalcCanvasComponent, SectionCanvasComponent
],
entryComponents: [AlertDialog],
// entryComponents: [AlertDialog],
bootstrap: [AppComponent]
})
export class AppModule { }
import { Component, Input } from '@angular/core';
import { MdDialog } from '@angular/material';
// import { Component, Input } from '@angular/core';
// import { MdDialog } from '@angular/material';
@Component({
selector: 'dialog1',
template: `
<h2>{{_text}}</h2>
`,
providers: [MdDialog]
})
export class AlertDialog {
/**
* text input attribute
*/
private _text: string;
// @Component({
// selector: 'dialog1',
// template: `
// <h2>{{_text}}</h2>
// `,
// providers: [MdDialog]
// })
// export class AlertDialog {
// /**
// * text input attribute
// */
// private _text: string;
// constructor(private _dialog: MdDialog) { }
// public get dialog() {
// return this._dialog;
// }
// // constructor(private _dialog: MdDialog) { }
// // public get dialog() {
// // return this._dialog;
// // }
@Input()
public set text(s: string) {
this._text = s;
}
// @Input()
// public set text(s: string) {
// this._text = s;
// }
// public run(t: string) {
// let dialogRef = this._dialog.open(AlertDialog);
// // let ad: AlertDialog = dialogRef.componentInstance;
// // ad.text = "azeaze";
// this._text = t;
// }
}
// // public run(t: string) {
// // let dialogRef = this._dialog.open(AlertDialog);
// // // let ad: AlertDialog = dialogRef.componentInstance;
// // // ad.text = "azeaze";
// // this._text = t;
// // }
// }
import { Injectable } from '@angular/core';
import { Http, RequestOptions, RequestOptionsArgs, Headers, Response } from '@angular/http';
import { Observable } from "rxjs/Observable";
import 'rxjs/add/operator/map';
@Injectable()
export class HttpService {
......
......@@ -27,7 +27,7 @@
'@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
'@angular/material': 'npm:@angular/material/bundles/material.umd.js',
// charjs
// chartjs pour angular4/angular5
'angular2-chartjs': 'npm:angular2-chartjs',
'chart.js': 'npm:chart.js/dist/Chart.bundle.js',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment