Category "angular"

Angular2 empty response handling

In my current application I can't seem to get a response from the observable when it's an empty array or when it takes too long for the server to reply. Here is

Angular TSLint - Cannot find builder "@angular-devkit/build-angular:tslint"

When I try to run command ng lint --fix cli throws this error: An unhandled exception occurred: Cannot find builder "@angular-devkit/build-angular:tslint". See

Set vertical scroll to a fixed height mat-table in Angular

I have set a height of 200px to the container of my mat-table. However, the table and its content does not respect the setted height. I want to add a vertical s

Ngx-translate not translating anything

I am in the process of internationalizing my current Angular 12 prototype application. Prototype means there is only the skeleton and a bunch of administrative

I get this error:Cannot find module '@angular-devkit/build-angular/package.json when I try run my app with ng serve from Linux

hello guys I have this next error when I try run my App from the terminal(linux), when I run this command: ng serve and I get this error in my terminal: A

animateChild() for nested Angular child animation not working

I would like to fire two animations at the same time on click. The animation triggers use the same state, one is placed on an outer parent div and the other is

How can I make dynamic url to external site in angular5?

When I'm trying to make link like this: <a [href]="getUrl()">click me</a> getUrl() { return this.domSanitizer.bypassSecurityTrustUrl

TypeError: Cannot read properties of undefined (reading 'match')

I have upgraded my Angular application from 12 to 13 version. And I started getting this error during unit test run. Chrome Headless 94.0.4606.61 (Windows 10) A

async await in switch case statement does not work

can we wait for the resolution of a promise within switch case statement, using the keyword await? in my angular component I have the following code which crash

Angular build generates index.html with <style> tag

My build process generates index.html with tag <style>, but because of I use CSP and i dont want to insert into my code style-src 'unsafe-inline' it doese

How to unit test a component that depends on parameters from ActivatedRoute?

I am unit testing a component that is used to edit an object. The object has an unique id that is used in order to grab the specific object from an array of obj

Angular-router not works at vercel

I'm working on the serverless web MEAN and I'm trying to publish on vercel. When I'm trying to access some route through the navigation menu, the router is work

Ngxs - How do I chain actions?

I want to do something like this for my registration. When clicking the register button, this will be executed: this.store.dispatch(new Register(user)) .s

Angular 12 setting up Unit test with JEST when running no tests found

Edit: My Jest was not setup on my Angular project properly. so if you are experience this then your Jest was not setup properly, if anyone has a good guide on s

Clear angular cache in .angular folder

From version 13.0.0 there will be a .angular folder generated in root which is ignored by git containing a cache folder which caches builds. How can I remove (o

How to create new event for unit testing in Angular 2?

Hi I am writing unit test case for my angular code. I am trying to update textbox in gridview. Below is my gridview code. <input *ngIf="editing[rowIndex + '

Returning JSON data as a stream per chunk to Angular2 or jQuery over HTTP2 (HTTPS)

In one of my API's I mostly return a result (let's say paged 50 results) as one whole in an json array like so: [{},{},{},{},{},...] I was wondering if there

Property 'subscribe' does not exist on type 'OperatorFunction<Response, Recipe[]>'

I'm trying to fetch data from firebase, but facing an error "Property 'subscribe' does not exist on type 'OperatorFunction'" any idea? whats missing here

Grid lines are not showing primeng table

Created a table grid using and sometimes the vertical or horizontal lines are not showing up. When I change the zoom percentage or refresh the page or scroll t

I am getting this error "TypeError: this.reCaptchaApi.render is not a function" when I try to access elements of reactive form for unit testing

I am trying to write unit test cases for registration component in my project, but when I try to access a input ele by ID to test it's placeholder which is in t