Questions tagged [angular10]

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

Breaking Changes:

  • Typescript 3.6, 3.7, and 3.8 are no longer supported. update to Typescript 3.9.
  • Input fields of type number fire the valueChanges event only once per value change (as opposed to twice in some cases). See PR 36087.
  • The minLength and maxLength validators only validate values that have a numeric length property. See PR 36157.
  • Templates with unknown property bindings or unknown element names now log errors instead of warnings. See PR 36399.
  • UrlMatcher can now return null values. See PR 36402.
  • Transplanted views now refresh at insertion point only. See PR 35968.
  • Formatting times with the b or B format codes now supports time periods that cross midnight. See PR 36611.
  • Navigation is canceled for routes with at least one empty resolver. See PR 24621.

See the changelog for latest version information.

Read more at the Angular Website

837 questions
8
votes
3 answers

Unable to update Angular from 10 to 11 due to dependency errors

I am following this site and trying to update my project to 11.0 through the following command. npx @angular/cli@11 update @angular/core@11 @angular/cli@11 Every time I run it, it gives me the following error: npm ERR! ERESOLVE could not…
mfs
  • 3,984
  • 6
  • 32
  • 51
8
votes
3 answers

Angular 10 “No definition found for …” in HTML component in Visual Studio Code

I'm working with angular 10 in VSCode and everything was working fine until today. Suddenly I can't go to definition from HTML component neither via F12, right click - Go to definition nor Ctrl+click. Go to definition works just on typescript…
8
votes
1 answer

Circular dependency in DI detected for ApplicationRef. How to fix it

I am a beginner in Angular and tried to implement global error handling in the application for this purpose I create appErrorHandler class and implement ErrorHandler and I inject Toast Service on this class but it shows me above…
8
votes
2 answers

cdkFocusInitial attribute not focusing the DOM element

In Angular 10 project, I have a form with 2 inputs named Username and Password. I am using cdkFocusInitial attribute on username field, however it's not focusing on page load. Here is a StackBlitz example that shows the issue…
Pavan Jadda
  • 4,306
  • 9
  • 47
  • 79
8
votes
1 answer

Angular 10 Upgrade: Why use @Directive() instead of @Component() for abstract (component) classes?

I recently upgraded my Angular app from v9 to v10. I noticed that undecorated classes are not supported anymore. See here So during ng upgrade my abstract components without decorates have been changed to have a @Directive() decoratror. For…
Rose Nettoyeur
  • 885
  • 1
  • 16
  • 29
7
votes
4 answers

How to pass data between routed components in Angular

I have a routed component like this: From component A: I have an object that was fetched through an API, At the moment I have a button that is redirecting me to Component B. There is no parent child relationship between components A and B. What I…
Taieb
  • 920
  • 3
  • 16
  • 37
7
votes
2 answers

this.debug is not a function Angular Universal

I'm applying SSR in my project by using Angular 10. I've found that lot of people recommend using domino. Below is my server.ts file ... import { existsSync, readFileSync } from 'fs'; import { createWindow } from 'domino'; const scripts =…
7
votes
3 answers

Angular 10 FileReplacements not working for Assets

We are currently upgrading out project from Angular 8 to 10, and we are running into some trouble with the file replacements during build. We have 2 different stylings with different texts which used to be selected by doing FileReplacements in the…
AndideBob
  • 150
  • 1
  • 2
  • 9
7
votes
2 answers

Uncaught (in promise): TypeError: Cannot read property 'ɵcmp' of undefined in angular 10

I am getting this error Uncaught (in promise): TypeError: Cannot read property 'ɵcmp' of undefined in angular when trying to load the app I just compiled with --prod flag with both optimization and buildOptimizer set as true, when I set both to…
Muhammad
  • 71
  • 1
  • 1
  • 4
7
votes
2 answers

Angular 10 npm error hasBindingPropertyName is not a function

I am getting this error all of sudden in Jenkins build, i tried upgrading to latest Angular that is 10.1 but even after upgrading issue is not resolved. So i rolled back to Angular 10.0, package.json dependencies below [09/11/2020 03:26:56.420] -…
Pat
  • 535
  • 1
  • 16
  • 41
7
votes
1 answer

aws-amplify warning after updating angular application to the latest version 10.0

I have updated the angular application to the latest version, and keep getting the warning message from the @aws-amplify. I know angular 10 doesn't remend to use commonjs. Since the @aws-amplify is on that, how can I remove the warning? I tried…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
7
votes
4 answers

Displaying content of Component that i fetched with @ContentChildren or @ViewChild

So I'm trying to display child components at specific locations in my Component. I have the following: @Component({ selector: 'app-item-list', template: `

{{item.order}}