Skip to main content

Questions tagged [angular8]

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

Filter by
Sorted by
Tagged with
338 votes
9 answers
215k views

How should I use the new static option for @ViewChild in Angular 8?

How should I configure the new Angular 8 view child? @ViewChild('searchText', {read: ElementRef, static: false}) public searchTextInput: ElementRef; vs @ViewChild('searchText', {read: ElementRef, ...
Patrik Laszlo's user avatar
185 votes
11 answers
113k views

Angular 8 - Lazy loading modules : Error TS1323: Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'

When I updated Angular from 7 to Angular 8, getting error for lazy loading modules I have tried the options, which are there in the angular upgradation guide Made the below changes: Before ...
RajuPedda's user avatar
  • 3,281
176 votes
10 answers
279k views

Repository is not clean. Please commit or stash any changes before updating In Angular 8

Error Repository is not clean. Please commit or stash any changes before updating when i have updated from version 7 to Angular 8. Angular Guide for upgrade https://update.angular.io/#7.0:8.0 ...
afeef's user avatar
  • 4,616
152 votes
12 answers
82k views

Job name "..getProjectMetadata" does not exist

I updated my angular to v9 and when I try to go back in v8, I receive this error. I have already tried the following: uninstall -global angular/cli uninstall angular/cli go back to my last package....
Guillaume Gaujac's user avatar
86 votes
13 answers
87k views

How do I support Internet Explorer in an Angular 8 application?

When I generate a project with Angular CLI (8.0.0), I run ng serve, open the application up in Internet Explorer and I am presented with a blank screen. I had a look at the polyfills.ts files and I ...
James Barrett's user avatar
76 votes
11 answers
90k views

Call retries were exceeded exception while ng build

I am facing an exception while ng build (generating ES5 bundles for differential loading...) An unhandled exception occured: Call retires were exceeded Used versions: Angular-CLI: 8.3.20 Angular: 8....
Savan Gadhiya's user avatar
70 votes
12 answers
73k views

NgRX effects - Type 'Observable<unknown>' is not assignable to type 'Observable<Action>'

While working with NgRX 8 my colleagues and me are frequently facing a weird error message when implementing the effects. Type 'Observable<unknown>' is not assignable to type 'Observable<...
Felix Lemke's user avatar
  • 6,365
68 votes
11 answers
150k views

Angular - No pipe found with name

I've created a pipe using "ng g pipe" command. I'm getting a console error when I'm using it in my code. The screenshots of the code are attached below. Error: error NG8004: No pipe found with name '...
Riyasree's user avatar
  • 736
61 votes
7 answers
163k views

Blocked because of a disallowed MIME type (“text/html”) : Angular 8 deployed on tomcat 9.0.30 fails to serve the assets

I have a project in which the user interface is based on angular 8 and the backend is a springboot java service. The entire project is a multi module project with the angular part being a separate ...
Ananthapadmanabhan's user avatar
52 votes
6 answers
131k views

How to reload or refresh only child component in Angular 8

I have two components, One parent and Other Child. HTML Part <div> <div class="row col-md-12"> <div class="col-md-4"> <!-- Some HTML Code of Parent component over ...
Saurabh Singh Rajput's user avatar
52 votes
2 answers
34k views

Is not core-js needed anymore?

I've updated an Angular project from version 7 to 8. Everything runs smoothly, schematics did it's job (maybe) and we are Ok (project is even in production). When we're updating Angular CLI, we always ...
Daniel Díaz Astudillo's user avatar
51 votes
2 answers
71k views

error TS2554: Expected 2 arguments, but got 1 with @ViewChild

I was using ViewChild as follows: @ViewChild("InternalMedia") localStream; @ViewChild("emoji") mEmoji; Which was working fine till angular-7.x as soon as I upgraded it to angular-8.x it started ...
Akhilesh Kumar's user avatar
43 votes
6 answers
57k views

How to use the MatTableDataSource with an observable?

I am using the mat-table and I am trying to use the MatTableDataSource with an observable (I get the data from a web service), but I don't know how to configure the MatTableDataSource to use an ...
Christoph Hummler's user avatar
38 votes
7 answers
19k views

Angular 8 ng-build throwing MIME error with cordova

While executing ng build --prod --base-href ./ for building my cordova app, the final output throws an error as below. Failed to load module script: The server responded with a non-JavaScript MIME ...
Nidhin Joseph's user avatar
36 votes
12 answers
66k views

Angular 8 viewChild returns undefined

I am trying to access the childView instance but it keeps saying the the childView is undefined. Here is my code for childViews: @ViewChild(CreateQuestionnaireComponent,{ read: true, static: false })...
Nesan Mano's user avatar
  • 2,108
29 votes
1 answer
22k views

Package '@angular/core' is not a dependency. while updating angular 8 to angular 9

While updating angular 8 project to angular 9 , getting error ✔ Package successfully installed. Using package manager: 'npm' Collecting installed dependencies... Found 0 dependencies. Package '@...
Ashutosh Jha's user avatar
  • 16.1k
28 votes
5 answers
72k views

Type 'AbstractControl' is missing the following properties from type 'FormGroup': controls, registerControl, addControl, removeControl, and 3 more

we recently upgraded from ng 7.2.15 and typescript 3.2.4 to angular v8.2.14 and typescript v3.5.3. Passing the form group from a parent component to child component is no longer working. Below is my ...
Priyanka's user avatar
  • 418
26 votes
4 answers
64k views

How to implement behavior subject using service in Angular 8

I'm new to Angular and I'm having an issue. I'm creating an app with several sibling components. When I update a value in one component other components don't update. I know that to resolve this ...
kkD97's user avatar
  • 263
24 votes
14 answers
73k views

Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class in angular 8 [duplicate]

ERROR in node_modules/@angular/common/http/http.d.ts:2801:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class 2801 export declare class ...
Kapil's user avatar
  • 261
24 votes
2 answers
16k views

How to replace index.html in Angular 8.3+ depending on environment?

I am working on an application that was set up using jhipster, Spring Boot and Angular I need to set up different public keys for something depending on whether the app is running on dev or prod. I'...
Marvin Falkner's user avatar
24 votes
4 answers
40k views

Preserve Symlinks in Angular Libraries

I have a problem. I'm trying to make a Angular 8 Library using ng-cli, but i can't preserve symlinks from my external application using npm link. I've tried to add this on my angular.json: "...
andersonbalves's user avatar
23 votes
2 answers
18k views

ng serve is not working after Angular 8 update

Error Could not find the implementation for builder @angular-devkit/build-angular:dev-server ng serve Could not find the implementation for builder @angular-devkit/build-angular:...
afeef's user avatar
  • 4,616
22 votes
9 answers
34k views

Why is the ion-back-button not shown?

The ion-back-button does NOT show up to the right of the ion-menu-button. Why is that? the ion-menu-button and the ion-title show properly and aligned on the same horizantal position. <ion-header&...
feder's user avatar
  • 1,963
22 votes
5 answers
71k views

How to solve catch error in Observable in angular 8?

I do error handler code, but I got error in catch. undefined method. This is my serivce.ts code. import { Injectable } from "@angular/core"; import { HttpClient, HttpErrorResponse } from "@angular/...
Ashruti's user avatar
  • 321
22 votes
14 answers
58k views

Angular 8 showing blank page with no errors

I am developing an Angular 8 application that will login to a .Net Core Rest API using JWT Token Authentication. When I start the application the application compiles successfully with no errors. ...
freelancer86's user avatar
21 votes
11 answers
54k views

How to solve error in HostResourceResolver?

What would be the steps to resolve this error? ERROR in HostResourceResolver: could not resolve styles.css in context of C:/Users/shema/Desktop/angular/RP/ResourcePlanning/src/app/addproject/...
Shema Jacob's user avatar
18 votes
1 answer
11k views

Angular + Jest: Can't resolve all parameters for AppComponent: (?)

I am operating inside a Typescript Monorepo. I want to add an Angular 8 frontend with Jest testing to the Monorepo. But I am encountering some issues. I am using Angular CLI: 8.3.5 What I did I ...
Florian Ludewig's user avatar
18 votes
2 answers
21k views

Angular Tree Shaking: How exactly does it work?

We are currently trying to optimize a complex angular application (performance & bundle size). We found that we have partially unused components, but we are not 100% sure about them. Anyway... The ...
Codehan25's user avatar
  • 2,934
18 votes
2 answers
5k views

Lazy loading and setting LOCALE_ID at runtime from an API in Angular 8 application on startup

We have an approach for lazy loading and setting the LOCALE_ID of the Angular application from the API (by loading the user profile data during on startup). This worked fine on Angular 7 but when I've ...
Botond Béres's user avatar
17 votes
3 answers
15k views

Angular v8 - @ViewChild static true or false

Angular v8 has just been released. Although it's mostly backward compatible, there's some Breaking Changes. According to Angular's Changelog one core change is (and I quote): "In Angular version ...
Gil Epshtain's user avatar
  • 9,465
17 votes
3 answers
83k views

How to convert datetime UTC to local time Angular? [duplicate]

I have UTC time in database. I want to convert this time to local time in format dd.mm.yy h.m.s How to do that? My date is in UTC: 2019-08-08 08:57:59 In need local time +4:00
POV's user avatar
  • 11.8k
17 votes
4 answers
64k views

Retrive selected value of ng-select - Angular8

I am a novice with Angular 8. I created the following dropdown menu, in a component, that works very well for me: <ng-select class="w-25 p-3" placeholder="{{'author' | translate}}" [clearable]="...
Memmo's user avatar
  • 248
17 votes
3 answers
9k views

Angular Application Doesn't load up App Module/Components after Upgrade to Angular 8.3.5

We have an Angular 4 project that I've recently tried to upgrade to Angular 8. I followed the migration guide in Angular website, changed some of the syntaxes, and everything preventing project to be ...
Mustafa Mohammadi's user avatar
16 votes
10 answers
101k views

How to reload a page in Angular 8 the proper way

NB. I've got a set of resulting from googling but, as I explain at the end, I sense that they aren't reliable, due to diversity. I have two utility methods - one for navigating to the parent node and ...
Konrad Viltersten's user avatar
16 votes
2 answers
17k views

How to resolve an 'Invalid format version detected - Expected:[ 1 ] Found: [ 3 ]' error when creating a component in Angular 8?

I need to create a component in my project in Angular 8, I tried the following command: ng g c prueba but it returned back an error as: Invalid format version detected - Expected:[ 1 ] Found: [ ...
andrestabares's user avatar
16 votes
3 answers
40k views

How to select only year on mat-datepicker

I'm developing an application with angular 8 in which I have an input that contains only year number. I have used mat-datepicker and want only to choose year. <mat-form-field class="input-...
walidtlili's user avatar
  • 1,032
16 votes
2 answers
8k views

What's the difference between providing and injecting 'Window' vs Window in Angular 8 and 9?

I have two Angular projects using these versions: 9.0.0-next.6 8.1.0 In the version 9 I used this to provide and inject the window obhject: @NgModule({ providers: [ { provide: Window, ...
lampshade's user avatar
  • 2,686
16 votes
2 answers
28k views

Angular 8 Intercept call to refresh token

I am trying to refresh access token if current access token is expired. I am sending multiple requests at one time and I want to make a kind of a queue, so other requests won't request refreshing ...
AntGrisha's user avatar
  • 419
15 votes
3 answers
14k views

npm run build:ssr does not work in angular 8

I use angular 8 and server-side-rendering but i got error when i run npm run build:ssr As you can see, src is repeated twice home/app/front/**src/src**/main.server.ts I tried everything without ...
user9714967's user avatar
  • 1,832
15 votes
4 answers
10k views

this.router.events not loading on first time in Angular

Does anyone have any idea on how to get the router events to fire the first time the component is loaded? I am using Angular 8. I have a deep link that moves to another component. So when I click on ...
Aakankshi Gupta's user avatar
15 votes
3 answers
18k views

ControlValueAccessor with Error Validation in Angular Material

I am trying to apply Error Validation style with ControlValueAccessor in custom Material Input Textbox. Ever since applying this custom component, all the red border validation status with ...
user avatar
15 votes
3 answers
3k views

Improving production build time for Angular 8 application in Azure Devops

I am trying to increase Angular Build production speed with command below, Ran the following command, however no improvement in build time, still at 14 min. Is the --prod command making it ignore the ...
user avatar
15 votes
1 answer
1k views

Angular (8) Universal with firebase cloud functions - can't match any routes

UPDATE: I created a new project with every angular update there was and now on 8.2.0 it seems to be working. Just follow the instructions below, BUT there's currently a bug within webpack. So, after ...
Gerrit Hillebrecht's user avatar
14 votes
5 answers
26k views

node_modules/ngx-toastr/toastr/toast-noanimation.component.d.ts(19,9)

shared.module.ts import { animate, state, style, transition, trigger } from '@angular/animations'; import { ToastrModule } from 'ngx-toastr'; import { BrowserModule } from '@angular/platform-browser';...
Harshal Surve's user avatar
14 votes
6 answers
73k views

Difference between two dates in Days using angular

In my application I am getting message sent date from API response, I want to calculate the difference between current date and the date from API response in days(difference) using angular 8 and map ...
web developer's user avatar
14 votes
9 answers
48k views

How to Set Placeholder on Select Tag in Angular 8?

I am creating a dropdown to filter data so I have created a dropdown <form #filter="ngForm" (ngSubmit)="filterta(filter)" style="display: flex;"> <select ngModel #month="ngModel" ...
Nitin tiwari's user avatar
14 votes
8 answers
39k views

Angular 7/8 - How to get url parameters in app component

I have Single sign on in place but for testing I want to read the values from the url localhost:4200/?id=test&name=testing&[email protected] and pass them to an API in app component. ...
Lovika's user avatar
  • 619
14 votes
3 answers
33k views

Converting an Image url to base64 in Angular

I am struggling trying to convert a given image url to base64... in my case i have a String with the image's path var imgUrl = `./assets/logoEmpresas/${empresa.logoUrl}` how can i convert the given ...
Sergio Cano's user avatar
14 votes
4 answers
15k views

After update to Angular 8 CLI throws ".getColorDepth is not a function"

A collegue of mine upgraded our project to angular 8. I pulled his branch and run npm install. On his branch everyhing works fine. I do now get the same error every time i run any "ng ..." command: C:...
M.D.'s user avatar
  • 273
14 votes
2 answers
6k views

d3.js runtime error after upgrade to Angular 8

I am experimenting with upgrading my Angular 6 application to Angular 8. My code compiles, but I immediately receive a run-time error "d3.js:8 Uncaught TypeError: Cannot read property 'document' of ...
troyprince1243's user avatar

1
2 3 4 5
95