Questions tagged [angular-template]

Use this tag for Angular questions which are related to templates topics, such as interpolation ({{...}}), template expressions, template statements, data-binding...

The Angular application manages what the user sees and can do, achieving this through the interaction of a component class instance (the component) and its user-facing template.

In Angular, the component plays the part of the controller/viewmodel, and the template represents the view.

To find more information :

674 questions
-1
votes
3 answers

How to bind ngClass with obserable in angular

I have a container something like below Want to use the observable variable in other tags, getting…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
-1
votes
1 answer

Rewrite angular directive which uses template variables

I've written a structural directive which sets the itemTemplate on my custom Select2Component @Directive({ selector: '[bsItemTemplate]' }) export class BsItemTemplateDirective { constructor(private select2component: BsSelect2Component,…
Pieterjan
  • 2,738
  • 4
  • 28
  • 55
-1
votes
1 answer

Angular : unable to load component from library : Cannot read properties of null (reading '11')

Under my Angular app I'm trying to load a component which i'm getting from a local angular library My component (from library) looks like this : import { Component, OnInit } from '@angular/core'; @Component({ selector: 'lib-ada-headband-lib', …
firasKoubaa
  • 6,439
  • 25
  • 79
  • 148
-1
votes
1 answer

problem using different division according to condition required

i am developing a chat application. the problem in my app is i am not able to switch between (or use) different div according to condition i want to make sure that if username matches with the username of the message.then outgoing message class…
-1
votes
3 answers

How to Interpolate the Tag Name in Angular Template

I've some api data..Html Markup in Json format: [ { type: 'p', attributes: [...], children: [{...},{...}] } ] I would like to render that in an angular template. Since the name of the tag come from the api, i need to interpolate…
Benni
  • 69
  • 1
  • 4
-1
votes
2 answers

Displaying nested data in Angular ngFor set not working

I have a value set that I am trying to display. This is the structure of it. The problem I have is trying to display the third item as the structure of it is slightly different. Note this can be dynamic so it won't always be the third item that has…
skydev
  • 1,867
  • 9
  • 37
  • 71
-1
votes
1 answer

ngStyle Problem with receiving colors from an object/model

I have designed a special shape with html/Css and I want to receive its color from a data service. [ngStyle]="{'background-color':'#0B0036'}" when I use this code, everything works fine. but as soon as I try…
lydal
  • 802
  • 3
  • 15
  • 33
-1
votes
1 answer

Angular - Cannot find name CookieService

I've installed ngx cookie in my angular project, but unfortunatelly It's not recognized in my app.. I don't know what to do.. I saw in my node_modules folder ngx-cookie is there, but somehow it's not recognized in my app.. Here is my…
-1
votes
3 answers

How to compile dynamic html containing angular expressions

I am loading HTML containing angular expression from database. ex db html:
{{dynamicContent}}
I already have ngModel for "dynamicContent" in my component. Problem: When I load html from db it prints as plain html. It should evaluate…
Shiri
  • 47
  • 1
  • 10
-1
votes
1 answer

Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays. Angular

html
{{data | json}}
component.ts ngOnInit(){ this.showQuestion(); } Question: any []; showQuestion() { const Entity = new TaskViewEntity(someParameter,…
-1
votes
1 answer

Should I create Two Angular projects for Admin and Users?

I'm working on Spring boot Application for the back-end and angular 6 for the front-end. I'm going to include two html templates in angular, the first one is for the Administration and the second One for the users. So, should I create two Angular…
-1
votes
2 answers

Where can I find in Angular which template will be shown when application is runned?

I'm using Angular 4 and I've received project from my friend, and when I run a command: ng-serve -o some view is opened, that view/template is in project called: main-screen.component.html And here is whole component: import { Component, OnInit }…
billy_56
  • 649
  • 3
  • 11
  • 27
-1
votes
3 answers

Can't use ngIf and ngFor in same template correctly. Angular2

[playersTEST]="playerEL" (playerWasSelected)="onPlayerSelected(playerEL)">
-1
votes
2 answers

Small display problems of the select HTML

I'm on Angular, I created a form. And when I arrive on the page the select works but nothing is displayed.