From 09ea2073dd4c67be285a82086aababe323a41a90 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 6 Sep 2016 13:53:32 +0200 Subject: [PATCH] Outline the duck editor Signed-off-by: Gergely Polonkai --- app/app.component.html | 11 +++++++++++ app/app.component.ts | 9 ++++++++- app/app.module.ts | 6 +++++- app/models.ts | 4 ++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 app/models.ts diff --git a/app/app.component.html b/app/app.component.html index f69bb09..07375e7 100644 --- a/app/app.component.html +++ b/app/app.component.html @@ -1 +1,12 @@

Hello!

+
+
+ + {{ duck.id }} +
+
+ + +
+
+{{ duck.color }} diff --git a/app/app.component.ts b/app/app.component.ts index c530bc2..367d117 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,7 +1,14 @@ import { Component } from "@angular/core"; +import { Duck } from "./models"; + @Component({ selector: "duckbook-front", templateUrl: "/app/app.component.html" }) -export class AppComponent {} +export class AppComponent { + duck: Duck = { + id: 1, + color: 'yellow' + }; +} diff --git a/app/app.module.ts b/app/app.module.ts index e9e04cc..be11127 100644 --- a/app/app.module.ts +++ b/app/app.module.ts @@ -1,10 +1,14 @@ import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; +import { FormsModule } from "@angular/forms"; import { AppComponent } from "./app.component"; @NgModule({ - imports: [ BrowserModule ], + imports: [ + BrowserModule, + FormsModule + ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) diff --git a/app/models.ts b/app/models.ts new file mode 100644 index 0000000..269807c --- /dev/null +++ b/app/models.ts @@ -0,0 +1,4 @@ +export class Duck { + id: number; + color: string; +}