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

ng g class not working on angular 9 when creating classes

I just made a fresh project.When I entered ng serve then the project is running fine.But,I tried to make a class.ts file using : ng g class common/book --spec false I got this error: ng : File C:\Users\AshwinPC\AppData\Roaming\npm\ng.ps1 cannot be…
Random guy
  • 883
  • 3
  • 11
  • 32
0
votes
2 answers

Setting the value of a FormControl breaks its type

I have this FormGroup with this FormControl this.userForm = new FormGroup({ id: new FormControl(this.user.id), firstName: new FormControl(this.user.firstName), lastName: new FormControl(this.user.lastName), email: new…
Francis Ducharme
  • 4,848
  • 6
  • 43
  • 81
0
votes
1 answer

how to show/hide maximize/minimize button in custom titlebar in electron

So far I made a custom titlebar in electron (using angular 9) added those buttons to the html and click events respectively to minimize, maximize, restore or close the window. Now problem arises when user either double click the title bar( since css…
splintercell9
  • 183
  • 2
  • 16
0
votes
1 answer

Add Ionic Project within existing Angular Project

I have an existing angular project, in which I need to add an ionic project so that I can use ionic serve to run the ionic project and ng serve to run the angular project. I tried using ng add @ionic/angular and after creating a project using ionic…
Ashok Naik
  • 206
  • 1
  • 7
0
votes
0 answers

Lazy Load dialog component using Angular9 and Nebular

I am using NbDialogService from the Nebular component package to open Dialog components. I am using something like this: const dialogRef = this.dialogService.open(MyDialogComponent, { ... }); I am trying to load the dialog using the new capability…
Maayan Hope
  • 1,482
  • 17
  • 32
0
votes
1 answer

The Content should be Moved When the Sidenav bar Menu Appear

Goal: When you click on the icon menu in the header toolbar, it should be expanded and the content of "" should be moved more to the right due to the space of the sidenav menu. Problem: When clicking on the icon menu the…
HelloWorld1
  • 13,688
  • 28
  • 82
  • 145
0
votes
1 answer

Unit testing error: Cannot read property 'controls' of null

I'm trying to run simple test and I'm stuck with the following issue: TypeError: Cannot read property 'controls' of null at OvertimeComponent_ng_container_6_Template (ng:///OvertimeComponent.js:250:62) at executeTemplate My code of the…
Anna
  • 47
  • 6
0
votes
1 answer

How to pass function as data to another module component in angular?

I have a main module with some content and Nav I have sub modules (lazy loaded) within the main module which should be giving me the nav Items. I have made a service to pass data: const navItems = [ { text: 'Add', icon: faUser,, function:…
saeedar
  • 305
  • 2
  • 19
0
votes
1 answer

Angular(9) Material - span element not receiving value from mat-option

I'm working on a project which implements a custom component to implement Angular Material's mat-select. The problem is even though the data/value for select options (mat-option) is getting populated correctly in the business logic (.ts file),…
shamvi
  • 1
  • 2
0
votes
1 answer

How to add/remove or show/hide textbox in an Angular form according to dropdown value

On selecting a particular item from this open dropdown I want the textboxes to be shown in the form Each of these dropdown value has certain properties which are being fetched from database. This is the form
0
votes
1 answer

Prevent Angular 9 component from destruction on route change?

I have an angular 9 component which is used to upload data(images) to the server. I want to prevent the component from refreshing on routing. I want the upload to continue even on changing routes. How do I achieve this??
0
votes
1 answer

How to Retrieve Data into Fields in Angular 9 using JSON server?

I have a crud application with a form and table on it and they are in two separate components.I want to retrieve the data from my table as the user click the button of the selected record he wants to view. I can already get the data as I clicked the…
Xev
  • 109
  • 1
  • 1
  • 12
0
votes
2 answers

I recently getting a error when i updating my angular project 9.0.7 to 9.1.9

Recently, I am getting some error. when I update my angular project 9.0.7 to 9.1.9. This time i get this type of errors. ERROR in ../AppState/node_modules/@angular/core/core.d.ts:256:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type…
Shibaji Debnath
  • 1,105
  • 1
  • 10
  • 16
0
votes
1 answer

angular ngbuild prod is not loading any module

Running my application in local is working fine and when I do ng build --prod everything is compiling correctly but only the first component is displayed. I can't access to any other route (neither by navigating to the paths or interacting with this…
Pablo G
  • 199
  • 12
0
votes
1 answer

How to remove hash from url in Angular 9 and also update the url in the browser to the current url

This question is not the same as this one. I need to know how to remove the hash from from the url and also update the url in the browser. @NgModule({ imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled', useHash: false,…
user3230660
1 2 3
99
100