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
-1
votes
1 answer

Angular Reactive Forms, patchValue not working, nested forms

Stackblitz code Angular, Reactive Forms, Material UI, I have nested forms setup in split components. I have some fake data setup with InMemoryWebAPI, some of the properties are coming up as undefined although they are displayed in the component…
-1
votes
1 answer

Typescript Set Value of Class itself in Method, Inheritance from Base Class

How do I set a value of a class itself in its own method? Trying to utilize this. Receiving an error below . export class ProductForm extends FormGroup { constructor(){ super({ productName: new FormControl() }) } …
user15293929
-1
votes
1 answer

Not clearing the input (text) field value after Add / Remove Multiple Input Fields Dynamically

I am able to dynamically Add or Remove multiple input fields, But the issue is once I have added items and enter some values in the input fields and remove it using delete button, values are not getting cleared, i have tried to empty my array for…
-1
votes
1 answer

How to make optimal routing for ionic applications ? What life cycle methods should I choose?

In Ionic, pages are cached, and because of this, it is not always good to use angular lifecycle hooks (ngOnInit, ngOnDestoy, ...). They just won't work, because the page is still on the stack. With the help of Google and experiments, I learned 2…
-1
votes
1 answer

Unable to access the angular app running locally on localhost from a different machine

I'm trying to access my angular 10 app from other machine. I have tried the below options but nothing worked. ng serve --host 0.0.0.0 --disableHostCheck true ng serve --open --host 0.0.0.0 --disable-host-check ng serve --host 192.168.x.x I have…
Vinda
  • 213
  • 3
  • 7
  • 24
-1
votes
1 answer

How to manage the month and year dropdowns?

I am having below requirement. Everything is working fine but when the change the year dropdown values it'senter image description here affecting the month values for another month dropdown. Can I get a solution for this?
-1
votes
1 answer

What can be the reason for the error with render2 dependency injection?

I get the error below, for angular attribute testing when runningng test. No captured browser, open http://localhost:9876/ 03 01 2021 19:23:43.285:INFO [karma-server]: Karma v5.0.9 server started at http://0.0.0.0:9876/ 03 01 2021 19:23:43.286:INFO…
-1
votes
1 answer

Angular CSS Layout applying but without results

I did simple grid but it is looks like styles is applying but grid is not working correct. All grid items have wrong width and height but css is applied. Stackblitz Why is that? How to fix…
FFF01
  • 85
  • 5
-1
votes
3 answers

Angular: Validation pattern not to allow any space in input formcontrol

I used formcontrol in Angular2 and want to add validation pattern for not to allow No "spaces" at all in input. How can this be done? Similar question: How to add Validation pattern not to allow only space in input Angular2?
-1
votes
1 answer

How to get email addresses while fetching google contacts in angular 10

I am trying to get email of google contacts using people API and oAuth2.0. I am able to get all data except email. Any Suggestions app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from…
-1
votes
2 answers

Angular 10 check if a user is null to hide component element

I have a component where I want to hide an element if the user is null. Currently it shows if the user exists: Here is the component.ts part: this.user = this.auth.userSubject.asObservable(); I want…
John
  • 47
  • 1
  • 8
-1
votes
2 answers

Angular: Do not Display HTML Attribute if No Input

I have a Component, where we want to Input an HTML attribute. However if No value is provided for input, I do Not want even display the attribute in html. How can this be done? Right now it shows as "". export class ProductComponent implements…
user14665491
-1
votes
1 answer

Parent Child Communication Issue On Angular 9 & 10

We have a lot component interaction in my project through @Input and @output annotations. With the recent upgrade from angular 9 & 10 from angular 8 am facing few errors on passing the value to the @input annotation:
Pradeep
  • 1,192
  • 2
  • 12
  • 30
-1
votes
1 answer

Angular: Clear LocalStorage on First Deployment

Is there a way in Angular to clear All Local Storage or at least ones particular to the application through maybe ng build, or Angular deployment, or through Angular code itself? This inthrough in Chrome F12 Local Storage. This is the code…
user14432516
-1
votes
1 answer

how to format text entered in a textbox into a Date value

I am not very experienced in Angular. the version that we are using is Angular 10. There is a textbox , the user is expected to enter a date value ex. 10202020. This value has to be formatted into 10/20/2020 and immediately shown in the textbox. How…