From 4069e9662f603435541d75b723f1706344a98d9d Mon Sep 17 00:00:00 2001
From: "francois.grand" <francois.grand@irstea.fr>
Date: Thu, 6 Jul 2017 14:04:51 +0200
Subject: [PATCH] =?UTF-8?q?int=C3=A9gration=20du=20composant=20MdInputModu?=
 =?UTF-8?q?le=20(tag=20<md-input-container>)=20d'Angular=20Material?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 package.json                                  | 20 +++++++++----------
 src/app/app.module.ts                         |  8 ++++++--
 .../param-input/param-input.component.html    | 10 ++--------
 src/index.html                                |  9 +++++++++
 src/systemjs.config.js                        |  4 ++++
 5 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/package.json b/package.json
index bac0239c9..825abcde4 100644
--- a/package.json
+++ b/package.json
@@ -24,16 +24,16 @@
   "author": "",
   "license": "MIT",
   "dependencies": {
-    "@angular/common": "~4.0.0",
-    "@angular/compiler": "~4.0.0",
-    "@angular/core": "~4.0.0",
-    "@angular/forms": "~4.0.0",
-    "@angular/http": "~4.0.0",
+    "@angular/animations": "^4.2.5",
+    "@angular/common": "^4.2.5",
+    "@angular/compiler": "^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.0.0",
-    "@angular/platform-browser-dynamic": "~4.0.0",
-    "@angular/router": "~4.0.0",
-    "angular-in-memory-web-api": "~0.3.0",
+    "@angular/platform-browser": "^4.2.5",
+    "@angular/platform-browser-dynamic": "^4.2.5",
+    "@angular/router": "^4.2.5",
     "systemjs": "0.19.40",
     "core-js": "^2.4.1",
     "rxjs": "5.0.1",
@@ -43,7 +43,7 @@
   "devDependencies": {
     "concurrently": "^3.2.0",
     "lite-server": "^2.2.2",
-    "typescript": "~2.1.0",
+    "typescript": "^2.2.2",
     "canonical-path": "0.0.2",
     "tslint": "^3.15.1",
     "lodash": "^4.16.4",
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 74489f34d..76d21ee16 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -1,6 +1,8 @@
-import { NgModule } from '@angular/core';
 import { BrowserModule } from '@angular/platform-browser';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { NgModule } from '@angular/core';
 import { FormsModule } from '@angular/forms'; // <-- NgModel lives here
+import { MdInputModule } from '@angular/material';
 
 import { AppComponent } from './app.component';
 import { ParamInputComponent } from './param-input/param-input.component';
@@ -8,7 +10,9 @@ import { ParamInputComponent } from './param-input/param-input.component';
 @NgModule({
   imports: [
     BrowserModule,
-    FormsModule // <-- import the FormsModule before binding with [(ngModel)]
+    BrowserAnimationsModule,
+    FormsModule, // <-- import the FormsModule before binding with [(ngModel)]
+    MdInputModule
   ],
   declarations: [
     AppComponent,
diff --git a/src/app/param-input/param-input.component.html b/src/app/param-input/param-input.component.html
index 5bc39a870..ac16dbe77 100644
--- a/src/app/param-input/param-input.component.html
+++ b/src/app/param-input/param-input.component.html
@@ -1,9 +1,3 @@
-<div>
-    <label>{{_paramDef.symbol}}</label>
-    <input [(ngModel)]="_paramDef.v" />
-</div>
-<!--
 <md-input-container>
-    <input mdInput placeholder="{{_paramDef.symbol}}" value="{{_paramDef.v}}">
-</md-input-container>
--->
\ No newline at end of file
+    <input mdInput placeholder="{{_paramDef.symbol}}" [(ngModel)]="_paramDef.v">
+</md-input-container>
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
index b55dcdd59..ca397ac50 100644
--- a/src/index.html
+++ b/src/index.html
@@ -18,6 +18,15 @@
   <script>
     System.import('main.js').catch(function (err) { console.error(err); });
   </script>
+
+  <!-- Load the Angular Material stylesheet -->
+  <link href="https://unpkg.com/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">
+  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+  <style>
+    body {
+      font-family: Roboto, Arial, sans-serif;
+    }
+  </style>
 </head>
 
 <body>
diff --git a/src/systemjs.config.js b/src/systemjs.config.js
index 3e447512b..a8495fc4d 100644
--- a/src/systemjs.config.js
+++ b/src/systemjs.config.js
@@ -22,6 +22,10 @@
       '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
       '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
       '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
+      '@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
+      '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
+      '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
+      '@angular/material': 'npm:@angular/material/bundles/material.umd.js',
 
       // other libraries
       'rxjs': 'npm:rxjs',
-- 
GitLab