Questions tagged [angular11]

Questions about Angular version 11, the web framework from Google. Use this tag for Angular questions which are specific to only version 11. Use tag Angular for any Angular questions which are not specific to an individual version

700 questions
3
votes
0 answers

toggle component input using only template

How can I toggle an input to a component using a button, without creating a component property to hold the value? example:
Tomas Katz
  • 1,653
  • 1
  • 13
  • 27
3
votes
1 answer

'disabled' is defined as a property in class 'CanColor & CanDisableRipple & HasTabIndex & MatChipBase', but is overridden here in 'MatChip' as an acce

I updated my Angular version from 9.1 to 11 and now its giving compilation error. Error: node_modules/@angular/material/chips/chips.d.ts:120:9 - error TS2611:'disabled' is defined as a property in class 'CanColor & CanDisableRipple & HasTabIndex &…
3
votes
0 answers

How to implement google tag manager in ionic 5 with capacitor app

I want to use GTM (Google Tag Manager) in my ionic5 capacitor Android/IOS app, I have tried the cordova-plugin-tag-manager but don't know how to make it work with ionic5. Can you please suggest any other option which is compatible with both android…
Wasim
  • 99
  • 11
3
votes
2 answers

Angular 11, :enter and :leave animation not working with *ngIf

I just started with Angular animations. And wan't to animate a *ngIf with it. Sadly it does't work :(. I don't get an error message. I tried several solutions from here, nothing worked. Also removing one of the animations doesn't change anything or…
Marcel Bührig
  • 105
  • 2
  • 11
3
votes
0 answers

Ng serve fails on scss error and after fixing it, it doesn't recompile the app

I'm using angular 11 with scss. I'm serving the app using ng serve --aot command. It watches the files and compile the app after every change. When there are errors, the CLI detect the it and display the error. After I fix it, it recompiles the…
3
votes
1 answer

Object is possibly 'undefined' in ngif clause of angular 11

I have a service with the name “logManagerService” import { Injectable } from '@angular/core'; @Injectable({ // this line code make this service as singleton. providedIn: 'root' }) export class logManagerService { private…
3
votes
1 answer

Return false instead of undefined

On an Angular 11 / Typescript application I have: authorize(policy: Policy) : Observable { switch(policy) { case Policy.Admin: return zip(this.authenticationService.isSignedIn(), this.user$).pipe( map(([isSignedIn,…
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
3
votes
1 answer

"owl-carousel-o" not proper working with model in angular 11

I'm using with bootstrap model. here problem like below When click on image , model will be open but data not display properly at first time after pressing f3,f10,f11,f12 data will be displayed successfully. it is working properly…
M123
  • 1,203
  • 4
  • 14
  • 31
3
votes
1 answer

Remove hash(#) in URL Angular 11

I want to remove the # from the URL, but when I remove it, there will be a problem when I deploy it to the server. When the page is refreshed, will get a status of 404. example https: // a / user / (works) https: // a / user / 1 (Not…
Wisaroot K.
  • 45
  • 1
  • 6
3
votes
4 answers

Error: The pipe 'paginate' could not be found! with Ngx-pagination in Angular 11

I am using angular 11 and trying to implement pagination HTML {{ i + 1 }} {{…
TropicalViking
  • 407
  • 2
  • 9
  • 25
3
votes
2 answers

Type 'unknown' is not assignable to type 'any[] | Iterable | (Iterable & any[])

I am trying to make some custom search filter in my angular project it work fine, but in my vscode I got an error. In my previous project, it works fine after I update my cli I got an error like this. How can I solve this error? Thanks in…
Mohd Sabban
  • 182
  • 1
  • 12
3
votes
2 answers

Angular Get Height and Width of the component

I have a component which is manually resized so I've added a listener: @HostListener('window:resize') public detectResize(): void { // get height and width of the component this.theHeight = // the coponent height this.theWidth = // the…
teumec
  • 65
  • 1
  • 6
2
votes
1 answer

Error: Error on worker #1: Error: Debug Failure. Unhandled SyntaxKind: Unknown

I am upgrading my Angular project from version 10.2.x to version 11. As per official angular update guide, when I run the command ng update @angular/core@11 @angular/cli@11 --allow-dirty --force it throws following error: My package.json file…
Raj
  • 83
  • 10
2
votes
0 answers

Mongo DB search by condition priority

I am performing a search on the collection based on different columns. Basically what I need is that when I search, the name starting with the keyword entered should appear on top of the list, and then other names from different columns that contain…
SS_1528
  • 61
  • 5
2
votes
2 answers

show 1 data instead of all ngFor - Angular 11

Im trying to display total counts of enrollment with item.male_students & item.female_students UPDATE remove the ngFor now it works as expected. here's my component.html Total…