Hello,
I have a Angular 4 Component (Component-1)
in this Component i call a Web API they gives me Product Data back..
in this Component-1 in the HTML File i use this Syntax..
<app-component2>[products]='products'</app-component2>
ok in the Component-2 i have a @Input Decorator like this
@Input()products:any[];
in the Component-2 HTML i can give the Data correct out... this works.
but i have the Problem now i want to integrate a special Pager and for this
i must
have access to the Array of Objects i become from the Component1 via
Input.....
i must make something like this to bring the Data in a new Array of
Objects....
@Input()products: any;
public allItems:any;
ngOnInit()
{
this.allItems = this.products;
}
a i must have the Object Data where i become from the Component1 in
Component2 and put them
in a new Array of Data Objects....
but i cannot access in the Code of the Data products !!
in the HTML i have access to the Data and can give them out,
but in the .ts File i cannot access to the Data products...
have someone an Idea what i make wrong ???
Thanks
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.