Category "angular"

How to reload the current route with the angular 2 router

I am using angular 2 with hashlocation strategy. The component is loaded with that route: "departments/:id/employees" So far fine. After I do a successful batc

How to define Typescript Map of key value pair. where key is a number and value is an array of objects

In my angular2 app i want to create a map which takes a number as key and returns an array of objects. I am currently implementing in following way but no luck.

How to get current route custom data in angular 2?

I have set up routes is like below const appRoutes: Routes = [ { path: 'login', component: LoginComponent, data: { title: 'Login' } },

ngx-editor doesn't clear value

Nxg-editor (docs) can't clear its value on submit. I have a code like this in the form tag, but when I click on method using form.reset() it doesn't clear the v

angular 7 How to export ngx-datatable content to a excel sheet?

I have a pb with ngx-datatable and export excel. I try to use fileSaver, with angular 7. I implement a button for export and do this on it : var blob = new Bl

Angular - Difference between "optimization" and "buildOptimizer" in the build config (angular.json)

Can someone explain me exactly the difference between those two flags (optimization and buildOptimizer) defined in the build config angular.json during the buil

Two way data binding in model driven forms

I have a reactive form, in which, i have a first name, a last name and finally display name textbox. When i give first name and last name, the value of the disp

AngularFireList, property valueChanges() show the error Property 'query' is missing in type 'Observable<{}[]>

I'm having a hard time to figure out this error. Here is my code that I'm building in to make a AuthGuard service: user.service.ts: import { Injectable } from

Form validation error message show on submit in angular

I am trying to validate form in angular 6 but not working. My code is in stackblitz. How to validate that form and how to show error message? https://stackblitz

Disable 3rd state in Angular Material MatSortable

There are three states in sort direction of MatSortable. Is there a way to disable the 3rd state? It has 'asc' | 'desc' | '', id like to only have 'asc' | 'desc

what does the symbol '$' mean in angular?

What does mean by $ in ${some_var} search(term:string) { let promise = new Promise((resolve, reject) => { let apiURL = `${this.apiRoot}?term

How do I make the correct call from services using Angular?

Below, I have created a service of name util.service to call in manage-actives-crud.component.ts inside ngOnInit . Saying that everything that is different from

use of webcodecs API in Angular project?

I am trying to use features from the new webcodecs API in Chrome within an angular project. Typescript doesn't seem to be aware of the types, so I installed dom

How to bind the dropdown lists based on selecting the items from the dropdowns

I have one dropdown which I have to show this dropdown from constant.ts file And In second dropdown I have to show the dropdown based on the selecting the first

Conditionally applying css to mat form field

I am working on an angular application and I am using mat form fields in it. For changing color of botttom border of mat form field I am using mat-form-field-ri

Angular Compile Error: NG6001: The class is listed in the declarations of the NgModule 'AppModule', but is not a directive, a component, or a pipe

App fails to compile with error error NG6001: The class NavigationMenuItemComponent is listed in the declarations of the NgModule AppModule, but is not a dire

What is the difference between ng update and npm update?

Would someone please explain the difference between ng update in Angular 6 and npm update?

A ServiceWorker intercepted the request and encountered an unexpected error

I recently implemented Angular service workers in my web app and when I reload my app in some routes, I get this error and the site stucks in app-shell: Failed

Stack elements under each other inside ion-item

I am trying to stack items vertically under each other inside an ion-item: <ion-item> <ion-item-divider style="width: 100%;" item-content>

Is it possible to build an Angular app without embedded styles?

My company is going through a re-branding and it involves some color changes to our app. Most of this is just tweaking SCSS variables, but i'd like to be able