Questions tagged [angular9]

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

Questions about Angular version 9, the web framework from Google.

New Breaking Changes

  • Angular now compiles with Ivy by default. See Ivy compatibility section.

  • CLI apps compile in AOT mode by default (which includes template type-checking). Users who only built with JIT before may see new type errors. See our template type-checking guide for more information and debugging tips.

  • Typescript 3.4 and 3.5 are no longer supported. Please update to Typescript 3.6.

  • tslib is now listed as a peer dependency rather than a direct dependency. If you are not using the CLI, you must manually install tslib, using yarn add tslib or npm install tslib --save.


See the changelog for latest version information.

As of December 2019, the current RC version is 9.0.0-rc.7

Consider using the Update Guide for tips before changing the version.

You can read more about Angular version 9 here

1936 questions
0
votes
1 answer

Angular9: Type 'Observable>' is not assignable to type 'Observable'

In my angular application, I have a service file that makes API calls. in one of the function I have as below. getSelectedPractitionerPermissions(id): Observable { const url = apiUrl this.options = this.authService.getAuthInfo(); …
indra257
  • 66
  • 3
  • 24
  • 50
0
votes
4 answers

Angular 9 Adding Multiple Objects in an array overrides the existing array

I am using Angular 9 and am trying to add multiple objects in an array. But I see that on adding the new object the existing objects also gets changed. I suspect that is because the array has a reference to the object. How do I change…
Anamik Adhikary
  • 401
  • 1
  • 8
  • 27
0
votes
2 answers

Disable a Directive in production mode

In my project, we have classes for most of the elements that need to be targeted by the E2E tests:
...
Which gets compiled into
Nico
  • 790
  • 1
  • 8
  • 20
0
votes
2 answers

ERROR TypeError: Cannot read property 'ds' of null

I am using angular to create a app which asks for the location of user using browser. Below is my ts file code snippet. this is constructor in ts file. constructor(private route: ActivatedRoute, private router: Router, private ds: DataService) {…
0
votes
1 answer

Make dropdown menu use 100% width using Bootstrap 4

So this problem is making me go crazy guys. I created a dropdown menu using Boostrap 4, however when the screen is mobile size I used media query. I want to make my dropdown menu use 100% with when in mobile, and I already tried putting width 100%…
pedrohcms
  • 195
  • 1
  • 7
0
votes
0 answers

Angular: Topbar is not rendered after successful authentication

After a successful login, the token is generated and every component gets rendered except the top bar. I don't understand what's happening. Below is my code: Auth service private authStatusListener = new Subject(); loginUser(authData) { …
Avishek
  • 524
  • 16
  • 38
0
votes
1 answer

Can't bind to 'formGroup' since it isn't a known property of 'form' whilst using SharedModule

I've had this error lots of times and I've always been able to fix it but I think I'm overlooking something this time and I can't get it too work. As stated in the title, the error I get is Can't bind to 'formGroup' since it isn't a known property…
Ruben Szekér
  • 1,065
  • 1
  • 10
  • 21
0
votes
0 answers

How to import a Angular Component with own module?

EDIT: :facepalm: Found the error...
contacts.length == 0 I want to import a custom component (contact.component) with own module into…
Janneck Lange
  • 882
  • 2
  • 11
  • 34
0
votes
1 answer

Show / Hide list items in Angular in the HTML angular

I have a list of 4 items, the first 2 visible and the last 2 hidden. And a "show more / less" button that toggles the visibility of the last 2 items.
  1. {{ errorList }}

Harish S
  • 13
  • 1
  • 5
0
votes
1 answer

Jenkins build stuck with a message - Would you like to share anonymous usage data about this project with the Angular Team

I recently upgraded my Angular project from v7 to v9. When deploying it to Jenkins it gets stuck at the below message as soon as any 'ng' command encountered. "Would you like to share anonymous usage data about this project with the Angular…
Pradeep
  • 19
  • 5
0
votes
1 answer

Cannot read property 'currentValue' of undefined in JwPagination in angular 9

I am using Jw pagination and i have a page size which changes on 5,10,15 using dropdown.My angular version is angular 9. So in my html page,
Random guy
  • 883
  • 3
  • 11
  • 32
0
votes
1 answer

How to filter field value and send data into the firestore collection?

In the firestore collection named 'doctor' there are different fields including the field 'role'. I want to add the doctors into firestore with a role named doctor. How can I do this? Following is the code that successfully adds data into the…
pghasandi
  • 19
  • 7
0
votes
1 answer

Copy the Contents of Material Table to the Clipboard

I am using Angular 9 and using material table. I want to have a button which can copy the content of the table to the ClipBoard. I have tried using [cdkCopyToClipboard] and bind it to the dataSource but when I copy , the result I get is [object…
0
votes
2 answers

Run a second Observable is first Observable is false

I created the following AuthenticatedGuard in Angular 9: export class AuthenticatedGuard implements CanActivate { constructor(private authenticationService: AuthenticationService) { } canActivate(route: ActivatedRouteSnapshot, state:…
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
0
votes
1 answer

use Router navigate to go to newly created product in angular

I am trying to navigate to a newly created product after i click submit button. Now so far everything works fine but in my .ts file i want to redirect to lets say edit component of that product after it been created. How can i get the id of newly…