migrate create-auto
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
<p>create-auto works!</p>
|
|
||||||
|
|
||||||
<button (click)="createAuto()">Auto erstellen</button>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { Component, Output, EventEmitter } from '@angular/core';
|
|
||||||
import { Auto } from '../Auto';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-create-auto',
|
|
||||||
imports: [],
|
|
||||||
templateUrl: './create-auto.component.html',
|
|
||||||
styleUrl: './create-auto.component.css',
|
|
||||||
})
|
|
||||||
export class CreateAutoComponent {
|
|
||||||
@Output() autoInitializedEvent: EventEmitter<Auto> = new EventEmitter<Auto>();
|
|
||||||
|
|
||||||
createAuto() {
|
|
||||||
var auto = new Auto("BMW", "e36", "DE-RS-7331");
|
|
||||||
this.autoInitializedEvent.emit(auto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +1 @@
|
|||||||
<p>create-auto works!</p>
|
<button (click)="createAuto()">Auto erstellen</button>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, Output, EventEmitter } from '@angular/core';
|
||||||
|
import { Auto } from '../Auto';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-auto',
|
selector: 'app-create-auto',
|
||||||
@@ -6,6 +7,11 @@ import { Component } from '@angular/core';
|
|||||||
templateUrl: './create-auto.html',
|
templateUrl: './create-auto.html',
|
||||||
styleUrl: './create-auto.css',
|
styleUrl: './create-auto.css',
|
||||||
})
|
})
|
||||||
export class CreateAuto {
|
export class CreateAutoComponent {
|
||||||
|
@Output() autoInitializedEvent: EventEmitter<Auto> = new EventEmitter<Auto>();
|
||||||
|
|
||||||
|
createAuto() {
|
||||||
|
var auto = new Auto("BMW", "e36", "DE-RS-7331");
|
||||||
|
this.autoInitializedEvent.emit(auto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user