cockpit.component.ts......... ....... ......... ....... ......... ....... ........ ....... .. ..... ...... ....... ....
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
@Component({
selector: 'app-cockpit',
templateUrl: './cockpit.component.html',
styleUrls: ['./cockpit.component.css']
})
export class CockpitComponent implements OnInit {
@Output() serverCreated = new EventEmitter<{serverName: string, serverContent: string}>();
@Output() blueprintCreated = new EventEmitter<{serverName: string, serverContent: string}>();
newServerName = '';
newServerContent = '';
constructor() { }
ngOnInit() {
}
onAddServer() {
this.serverCreated.emit(
{serverName: this.newServerName,
serverContent: this.newServerContent
});
}
onAddBlueprint() {
this.blueprintCreated.emit(
{serverName: this.newServerName,
serverContent: this.newServerContent
});
} …Run Code Online (Sandbox Code Playgroud)我在chrome dev中遇到错误 使用ng服务后,我不断收到这些错误,尽管该应用程序似乎运行良好,但我一直在努力研究如何清除它们,但无济于事,我只需要清理这些错误
angular ×2