Category "angular"

How to encapsulate Angular app's global CSS within exported web component?

Goal I have an Angular 11 site with a large form component using Angular Material -- let's call it myExportableComponent. I want to use myExportableComponent i

How to remove Angular Universal on angular project

I enabled angular universal on my project . I would like to remove it completely now. I tried to remove the following files /server.ts /webpack.server.config.

An Observable for the Current Activated Route?

For various purposes, it may be advantageous to attach a listener to the Router which is called every time the route changes. This could be used to trigger an A

error TS2322: Type 'Event' is not assignable to type 'string'. [(ngModel)]="todoItem" (keyup) ="addTodo()"

I'm trying to bind my input to be able to display string. But I've this error: Error: list.component.html:3:15 - error TS2322: Type 'Event' is not assignable to

Angular mat-form-field how to set width:100%

I create a registration form as part of my learning Angular and Nodejs. My form looks wide and it is ok, however the fields on this form looks narrow or thin. I

how to get dropped element ID , dragDrop Angular

i use this function on drop from task planned into task progress onDrop1(event:CdkDragDrop<string[]>,id:any){ console.log('ondrop progress')

ASP.NET MVC (Razor) vs Angular 5

We are currently considering moving from ASP.NET MVC to Angular 5, mostly because it seems like the best and latest framework. However none of us seems to be ab

Disable button unless checkbox is checked (Angular 7+)?

I want to button to be disabled unless all checkboxes have been checked? How do you implement this in Angular? This is different because it is not a form and

Communicate between base window and popup window Angular 12

I need to trigger some event from the base window to a popup window when a user tries to open the same popup window again, which is a gear icon dropdown. What a

primeng table:p-table row grouping width not working when scrollable enable

I am using primeng table with angular.Below is the code for using table: <p-table [value]="cars" dataKey="brand" [scrollable]="'true'" scrollHeight="400px"&

Highlight selected row in primeng table without checking the checbox

I am using primeng p-table along with p-checkbox. I want to be able to highlight the clicked row (or the row content) without checking the checkbox. The Checkbo

Angular debug in VS Code - Breakpoints unbound

I'm trying to debug my Ionic/Angular project in VS Code, but once I start the debuging mode, all my breakpoints turn grey and become unbound. This is my launch.

override injection token in unit test

I have a simple service with an Injection token that is used to provide some kind of configuration for the service. It's all working as expected. Although I was

How to change primary color for Prime NG

How can I change default primary color for primeNG (saga-blue theme) ? changing --primary-color doesn't help, because in node_modules/..../theme.css elements ar

Update a single property of local JSON file using put call in Angular 8

I want to update my JSON file which I have placed in my assets folder, so If I am updating just one property of my JSON object so it should update that property

Update a single property of local JSON file using put call in Angular 8

I want to update my JSON file which I have placed in my assets folder, so If I am updating just one property of my JSON object so it should update that property

Can we control ViewEncapsulation.None from affecting the other components in the angular application?

@Component({ ... ... ... encapsulations: ViewEncapsulation.None }) when i use encapsulation like that it conflicts the default style in the other components i

CanActivate guards on child routes run before parent Resolve finish

I'm trying to resolve data before navigating to children routes as i have to use that data in children guard. The issue is parent resolver, resolves data after

ERROR Error: Cannot find control with path: 'products -> Quantity'

When I add one product in my form, show this error. My code ts: this.products = this.ps.getProduct(); this.addform = this.fb.group({ 'invoice_number': new F

Error: Cannot resolve type entity i10.BidiModule to symbol while building angular Lib project Angular 13

I am facing Error: Cannot resolve type entity i10.BidiModule to symbol while building angular Lib project. There are 2 other lib projects which are building fin