Questions tagged [angular7]

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

Questions about Angular version 7, the web framework from Google. Angular version 7 entered a 3 year Long Term Support period on July 1, 2018.

See the changelog for what changed in version 7.

If you need help upgrading from version 7 to version 8, please see the Official Angular upgrade guide

5213 questions
196
votes
18 answers

Errors: Data path ".builders['app-shell']" should have required property 'class'

I am getting this error while running my application. Here are the details of my application. Angular CLI: 7.3.3 Node: 10.15.1 Angular: 7.2.7 @angular-devkit/architect -0.13.3 @angular-devkit/build-angular- 0.800.1…
Ekta Gandhi
  • 1,979
  • 2
  • 7
  • 5
121
votes
5 answers

How to set value to form control in Reactive Forms in Angular

I'm new to Angular. Actually, I'm trying to subscribe data from a service and that data, I'm passing to form control of mine from (example, it's like an edit form). import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup,…
sun
  • 1,832
  • 4
  • 19
  • 31
98
votes
7 answers

Global scss variables for Angular components without importing them everytime

I do already have SCSS variables defined in src/styles/settings/_variables.scss and I am importing them into src/styles.scss, but still these variables aren't available for every single component. Is there any way to make a global file which holds…
Volodymyr Humeniuk
  • 3,411
  • 9
  • 35
  • 70
93
votes
17 answers

How to remove space bottom mat-form-field

I use angular 7 with angular material and i want to remove the space bottom as you can see. I tried many way but no sucess.
user9714967
  • 1,534
  • 3
  • 13
  • 21
71
votes
12 answers

Access to XMLHttpRequest has been blocked by CORS policy

I've a problem when I try to do PATCH request in an angular 7 web application. In my backend I have: app.use((req, res, next) => { res.set({ "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "*", …
rikg93
  • 1,101
  • 1
  • 11
  • 21
65
votes
2 answers

Angular CLI HMR with Lazy-Loaded routes hot-reloads the whole thing

(Confirmed an issue even with Angular 7). Let's get this fixed! I'm using HMR as set up here: https://github.com/angular/angular-cli/wiki/stories-configure-hmr from a fresh ng new build. If I change any component and make it lazy loaded, angular…
55
votes
3 answers

Property 'matchAll' does not exist on type 'string'

I want to apply Reg Expression on string. In order to get all groups result i am using matchAll method. Here is my code const regexp = RegExp('foo*','g'); const str = "table football, foosball"; let matches = str.matchAll(regexp); for (const match…
Yousuf
  • 760
  • 1
  • 5
  • 13
55
votes
2 answers

No name was provided for external module

I created a data library, then tried to include the data library into another created library. Built fine, but received - "No name was provided for external module 'my-data' in output.globals – guessing 'myData'". What am I missing? Complete steps…
user8508357
51
votes
2 answers

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 giving following…
Akhilesh Kumar
  • 9,085
  • 13
  • 57
  • 95
51
votes
5 answers

Angular 6+ :ProvidedIn a non root module is causing a circular dependency

I'm trying to provide a resolve service via the new providedIn attribute. This is a translations resolver which I use in a protected module: import { Injectable } from '@angular/core'; import { Observable , pipe } from 'rxjs'; import {map}…
Rot-man
  • 18,045
  • 12
  • 118
  • 124
50
votes
5 answers

Angular: create is deprecated: use new Observable() instead

I recently updated my version of angular using ng update and when running ng lint I am getting the error create is deprecated: use new Observable() instead this.data$ = Observable.create(t => { t.next(this.model); t.complete(); }); What…
mruanova
  • 6,351
  • 6
  • 37
  • 55
49
votes
6 answers

How to reload or refresh only child component in Angular 8

I have two components, One parent and Other Child. HTML Part
44
votes
8 answers

CORS policy don't want to work with SignalR and ASP.NET core

I have a problem with my ASP.NET core API and my Angular Client. I want to implement SignalR to have a connection between API and Angular. The cors policy are already activated on our client and the API because we can already retrieve data from the…
thelittlewozniak
  • 368
  • 1
  • 8
  • 21
39
votes
13 answers

Angular 7 error RangeError: Maximum call stack size exceeded

I am trying to learn angular by following the official tutorial but when following steps for hero component and hero detail component, it raises an error "RangeError: Maximum call stack size exceeded". The hero.component.html:
Abdul Ali
  • 1,905
  • 8
  • 28
  • 50
37
votes
5 answers

Open PWA when clicking on push notification handled by service-worker ng7 + android

We've a PWA implemented on angular 7 and NodeJS as backend. Push notification are sent from backend with web-push and handled by the angular service worker service. The behavior that we hope to have in Android is when the user clicks on the…
1
2 3
99 100