Questions about Angular version 11, the web framework from Google. Use this tag for Angular questions which are specific to only version 11. Use tag Angular for any Angular questions which are not specific to an individual version
Questions tagged [angular11]
700 questions
-1
votes
2 answers
Angular 11 Ternary expression *ngIF
I am stuck a bit. I am trying to write *ngIf else statement using ternary expression
The goal is to write *ngIf if a user is loggedin the logo a href leads to one Url if not logged in href leads to another…

Rollerball
- 13
- 3
-1
votes
1 answer
Type 'Observable
i have this problem in my service: Type Observable 'Object' is not assignable to type Observable 'Product. Have you any idea how to solve it?
this is my class
export class Product{
public id:number;
public price:number;
}
My…

Daniel
- 45
- 1
- 1
- 9
-1
votes
2 answers
Could not find my typescript property under the interface folder in the component.ts file
My code is something like that:-
I am creating an book.ts(property) under the interface folder, I am here created a book.ts file.but my book.component.ts doesn't find my book.ts property.but if I using an interface(book.ts) in the…
user14344635
-1
votes
2 answers
Not getting data in Angular while passing in router using navigation extras
I am using angular 11
in one component I have written this
user = {
id:1 ,
name:'abc'
}
constructor(private router2:Router) {
super(inj);
this.router2.navigateByUrl('/register',{ state: {user: this.user} });
}
in register…

Himil Kansara
- 1
- 6
-1
votes
1 answer
Failed to update data in angular
I am trying to build a .net core web api + Angular11(Full-Stack) project.I successfully created Add Data to DB in my back_End.but I am facing an issue when I trying to update my data.
here is my code:-
question.component.html
…
user14344635
-1
votes
1 answer
How to initialise an empty ComponentRef?
Using Angular 11 and Typescript Strict mode I have:
export class ModalService {
renderer: Renderer2;
component?: ComponentRef;
element: HTMLElement | null;
modal: HTMLDivElement;
constructor(private componentFactoryResolver:…

Miguel Moura
- 36,732
- 85
- 259
- 481
-1
votes
1 answer
What is the best approach to implement multi language app using angular and yii2
I'm using yii2 restful api for the backend, and angular for the frontend.
I want to ask about the best approach to implement multi-language feature that can manages both frontend an backend in the same place (db table, file).
-1
votes
2 answers
getting error as Cannot read property 'key' of undefined angular
I am getting error for my below code
error
TypeError: Cannot read property 'key' of undefined at EditorComponent.push.xD4D.EditorComponent.setFillColor (editor.component.ts:634)
ts
setFillColor(swatch: any): void {
this.palettes.selected =…

Mr.M
- 1,472
- 3
- 29
- 76
-1
votes
1 answer
Angular 11 CORS issue proxy port being incremented
I'm witnessing something that I really don't like and that I think is the root of my issue :
Access to XMLHttpRequest at 'https://localhost:5001/calls/api/Auth/register' (redirected from 'http://localhost:4200/calls/api/Auth/register') from origin…

tatsu
- 2,316
- 7
- 43
- 87
-1
votes
2 answers
Why does not ionic serve run?
I am getting this error while running ionic serve :
[ng] An unhandled exception occurred: The target entry-point "@ionic-native/splash-screen" has missing dependencies:
[ng] - @ionic-native/core
[ng] See…

rached cherif
- 1
- 1
- 3
-1
votes
1 answer
TypeError: Cannot read property 'of' of undefined
I have updated the Angular CLI to version 11.1.2, however after successful build, I have the following error in the browser console.
I honestly can't figure out what the problem is, if anyone happened please help me.

rikg93
- 1,101
- 1
- 11
- 21
-1
votes
3 answers
How to create array of objects dynamically in Angular 11?
I am trying to create array of objects dynamically in Angular. I have this segment of code:
data:{title:any,date:any};
arr:any=[]
this.service.calendarBooking().subscribe((res: any) => {
for (let i = 0; i < res.data.length; i++) {
…

sanjay
- 1
- 3
-1
votes
1 answer
Dockerise Angular 11 - i18n SSR (cannot find module express)
I have followed this tutorial and it works well but when I try to dockerize, the build is ok but when I run the image an error appears : Error: Cannot find module 'express'
DockerFile
FROM node:12 as buildContainer
WORKDIR /app
COPY…

mbagiella
- 256
- 2
- 12
-1
votes
1 answer
ASSERTION ERROR: This TNode does not belong to this TView. after angular update from v7.1 to v11
I have updated the angular app from v7.1 to v11, Updation was successful but after the update getting the below error.
ERROR Error: ASSERTION ERROR: This TNode does not belong to this TView. [Expected=> [object Object] == [object Object] <=Actual]
…

Umesh Naik
- 99
- 2
- 8
-1
votes
2 answers
angular nested component inside a custom module
so I am trying to build something using angular v11.
And my project structure is like this
page-not-found is a component, and umum is a module.
UmumModule is lazy loaded, declared in app-routing.module.ts
import { NgModule } from…

mozar
- 19
- 8