Category "angular"

Angular2: Directives: capturing click event on children

I know it must be something very simple, but cannot figure it today - Monday :) so, I have a directive for a responsive table import {Directive, HostListener}

Angular 13 Prerender error could not find main bundle

I'm trying to pre-render my Angular 13 application. The command which I'm running is: ng run ipe:prerender --routes-file ./data/routes.txt The error that occur

statusText always shows OK for StatusCode 401 where as expecting "Unauthorized" for 401

I dont understand why do I always see statusText as OK for StatusCode 401, whereas expecting "Unauthorized" for 401. Below is my code snippit. Please help me to

Optional-chaining in Angular

I'm using optional chaining on an object which in turn gives this error after compiling the code For example const someObj = {pet_animals: {'dog', 'cat'}}; cons

unable to resolve dependency tree error for creating new angular project

so today I wanted to create a new Angular project using the command ng new <projectname> and I got this error: npm ERR! ERESOLVE unable to resolve depende

How to check if at least one of three input fields is filled with content in Angular 7

I am developing a web client with angular 7 and bootstrap. On my start page I have a form group with three input fields and a submit button which shall be disab

Template is not rendering in Angular2

I want to render html template by giving url in Angular2, But template is not loading. I am using visual studio code editor, Below is my code and structure.

ES6 Modules : Importing a module in an Angular component

I have an ES6 module where I am exporting a library. I want to be able to use this module in an Angular component. I cannot have the library files locally withi

ES6 Modules : Importing a module in an Angular component

I have an ES6 module where I am exporting a library. I want to be able to use this module in an Angular component. I cannot have the library files locally withi

what is the alternative for the util.isNullOrUndefined(object) in the Util module ? Angular 7

util.isNullOrUndefined(object) has been depreciated and I cannot find any alternative for it. Can someone point out a feasible alternative for it? if (isNullOr

Property 'Draw' does not exist on type 'typeof Control'

I'm attempting to implement a map component with leaflet and other leaflet plugins. The issue is other plugins don't work from TypeScript for some reason. For

Keycloak / Angular - Always "invalid redirect_uri"

I have now looked through various questions & answers here, but cannot find a solution. The login and its redirect work perfectly. Only when I log in, I alw

ngDestroy executed too late: unable to call specif dispose method

I guys, I'm having a problem using ngDestroy. I need to call a "stop" method on a object initialized during ngInit, but when ngDestroy is called this object is

Angular 2: Get position of HTML element

I'm trying to implement a custom directive in Angular 2 for moving an arbitrary HTML element around. So far everything is working except that I don't now how to

Angular 2: Get position of HTML element

I'm trying to implement a custom directive in Angular 2 for moving an arbitrary HTML element around. So far everything is working except that I don't now how to

How to set default query params for Route in Angular 7?

In our Angular-7-Application, we use @ngrx and @ngrx/router-store to get the query params into the state. A few components of the application are paginated lis

Angular routing error cannot find parameter when redirecting to child route with parameter and outlet

I want to redirect to a child route with an outlet from a parent route with a parameter: { path: "projects/:projectKey", component: ProjectComponent,

Dynamically look for connected drop lists with Angular CDK drag and drop

I have an HTML element with a mouseenter listener that shows a hidden cdk drop list on mouseenter (with *ngIf). When on drag start of a cdk drag item, I'm getti

ngModel changes, ngModelChange is not called

<input type="number" style="width: 100px" [(ngModel)]="trait.userMinimum" (ngModelChange)="setThresholds()"> The model gets changed by the below code an

What is the use of onSameUrlNavigation property in Angular( versions greater than 5)

Recently I have heard about a property called onSameUrlNavigation where you can set it to "reload". I have googled about it but there are not many articles whi