Questions tagged components

Explore the latest questions and answers asked by our top developers.

Expected 1 arguments, but got 2 [closed]

I’m writing a delete paragraph, but when I put a "," there is an error. Please help me ! enter image description here enter image description here Source: Angular Questions

Remove view or element (component) to display a second component

I am a beginner on ANGULAR. I expose my problem: I have a component displayed on the screen with 2 inputs and a submit button. I created a second component, I will like when the user clicks on the button, say with simple words, that the whole page is deleted to be able to display […]

By Antholife
Published
Categorized as angular, components, typescript, updates, view Tagged , , , ,

TypeError: Cannot read properties of undefined (reading ‘fan’)

This is a parent component template file. It is not giving any problem app.component.html <div> <input type="text" [(ngModel)]="electronics.light" name="light" placeholder="light"> <input type="text" [(ngModel)]="electronics.fan" name="fan" placeholder="fan"> </div> <button (click)="display();">Display</button> <div *ngIf="flag"> <app-electronics-layout [images]="images" [electronicsObj]="electronics"></app-electronics-layout> </div> This is some part of the child component ts file where the display1() method is called on button click to verify […]

Angular recreate component

I have one problem. I have one menu component and a login page. If I log in my app menu shows some icons. But if I loggout my menu hiddes this icons. I want when I logout from my /home to recreate the menu component? How can I achieve that? Thanks Source: Angular Questions

By George
Published
Categorized as angular, components, recreate Tagged , ,

Angular event not triggered second time

I have a question. Why the second time I press click on parent component the event is not triggered? for example I have first component for parent <app-page> <div *ngFor="let object of objects$ | ngrxPush"> <app-parent> <div class="add-button"> <button (click)="onAddBtnClick(object)" mat-icon-button > </button> </div> </app-parent> <app-child-container [viewChildContainer]="object.showChildContiner" (containerClickOutside)="onContainerClick(object)" > </app-child-container> </div> </app-page> In .ts file […]

By DaVinci005
Published
Categorized as angular, click, components, eventemitter Tagged , , ,

Service doesnt refresh array

so I have array of objects in service which I fetch from api. I’ve made method to delete one of the emelements by clicking on button. It works, but in order for site to refresh I need to reload it and it shouldnt be this way. When I send delete request I filter array so […]

By Thomas124124
Published
Categorized as angular, components, service Tagged , ,

Dependency inheritance in Angular components – using subclass of dependency?

I’ve created a "CrudComponent" that basically performs CRUD operations, with a dynamically generated datatable view and input form and whatnot. The component injects a "DataService" with functions which basically wrap fetch functions, which are called on the component’s instance of DataService to send and retrieve data from the server. export class CrudComponent{ constructor(private dataService:DataService){ … […]

Why do I get an ‘undefined’ error in regards to the data in my Angular template?

I’m trying to create a template in my Angular 11 application but it’s not recognizing the data inside it. We have a Kendo grid, and we want the first column to consist of a button that brings up a menu when clicked. So I created a component to function as the button and the menu: […]

By gib65
Published
Categorized as angular, components, kendo-grid, templates Tagged , , ,

Angular error: ‘app-shipping’ is not a known element: If ‘app-shipping’ is an Angular component, then verify that it is part of this module

I have been having problems with using one component, stored in a feature model, in the root component. Screenshots will follow enter image description here enter image description here enter image description here Can you please help? Source: Angular Questions

By ser911
Published
Categorized as angular, components, module Tagged , ,

Can’t import ts file to component [closed]

I have a problem. I create authors.ts file and while i import it to author-list.component.ts, I get a error "’authors’ is declared but its value is never read". Structure : AuthorListComponent Source: Angular Questions

By Ju Ju
Published
Categorized as angular, components Tagged ,
1 31

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq