Skip to content
Advertisement

Tag: angular

Angular – How to link several typescript files with one template file?

Imagine if you have a typescript file like the following one: I would like to outsource these methods. However, the classes must inherit the properties from ProductAlertsComponent, as it would operate on/with them. So, in a separate file, I would do the following logic: But the template angular file (product-alerts.component.html) would not recognize calculatesAge() and checkIdPermission(). How could I solve

Re-render the particular component based on detected changes

I have 2 simple components. One is parent the other is child. The parent component has an Array, For each element in the Array, It renders the child component. parent.component.ts parent.component.html child.component.ts child.component.html The Problem The current code works just fine. But the issue is if the records of an element change in the array, It re-renders all the children

load data on change of dropdown in other component in Angular

I have component A which is navbar and component B which is list view Navbar has dropdown where all the users are listed, onInit method of component B all the data is loaded in the Component B Table that selected user is in local storage, now i want when the user changes the users from dropdown then that users data

Angular – form makes other elements unreadable

I have a page to maintain all the users of the application. In this application you first see a list of all user. When you click on the user you see details and have the option to change/delete. This works fine. Than I add an extra part to add users ‘voeg gebruiker toe’. This contains a form. When I added

Stop executing code until my async/await HttpClient get operation finishes executing code (including html calls)

I need to execute HttpClient get request synchronously so I found a solution on internet to use toPromise instead of subscribe and then await. However I have noticed that the this.form = = this.formBuilder.group line of code executes before myAccount is initialized by the async call. In other words I was expecting that the execution code will block until this.myAccount

Advertisement