2017-02-27 01:44:23 +01:00
|
|
|
<h1>Mein Angular-Blog</h1>
|
2017-02-27 11:45:59 +01:00
|
|
|
<app-blog-entry *ngFor="let entry of entries" [entry]="entry" [blogComponent]="this"></app-blog-entry>
|
2017-02-27 01:44:23 +01:00
|
|
|
<h2>Neuen Blog-Eintrag erstellen</h2>
|
|
|
|
|
|
|
|
<div class="form">
|
|
|
|
|
|
|
|
<div class="control">
|
|
|
|
<label for="title">Titel:</label>
|
|
|
|
<input type="text" id="title" #title />
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
<label for="title">Bild-URL:</label>
|
|
|
|
<input type="text" id="image" #image />
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
<label for="text">Text:</label>
|
|
|
|
<textarea id="text" cols="20" rows="3" #text>
|
|
|
|
</textarea>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button (click)="createBlogEntry(title.value, image.value, text.value)">
|
|
|
|
Blog-Eintrag anlegen
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|