Question: angular typscript mat table data. 1. I don't know what the problem is. when I debugging, the user input goes up to in app.html

angular typscript mat table data.

1. I don't know what the problem is. when I debugging, the user input goes up to" " in app.html but dose not get infomation " " in app.html. Errors do not rise. I can not see any information from data List window.

==dataList.Html=

==dataList.ts==

export class CutDataListComponent {

displayedColumns = ['name',.....]

@Input() dataSource: CutData[] = [];

====Newdata.html====

..

....

====Newdata.ts====

export class CutDataNewComponent {

name= '';

...

@Output() cutDataAdded = new EventEmitter();

onAddPost(form: NgForm) {

if (form.invalid) {

return;

}

const newcutData: CutData = {

name: form.value.name,

....

};

this.cutDataAdded.emit(newcutData);

}

}

===data.model.ts====

export interface CutData {

name: string;

....}

=====app.html====

....


====app.component.ts====

import { Component } from '@angular/core';

import { CutData } from './cut-data/cut-data.model';

@Component({

selector: 'app-root',

templateUrl: './app.component.html',

styleUrls: ['./app.component.css']

})

export class AppComponent {

loadedFeatur = 'cut-data';

storedDatas: CutData[] = [];

onNavigate(feature: string) {

this.loadedFeatur = feature;

}

onDataAdded(newcutData: any) {

this.storedDatas.push(newcutData);

console.log(this.storedDatas);

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!

name {{element.name}} Cut Ref {{element.crf}} Date {{element.date}} Coupon {{element.coupon}} Axial {{element.axial}}