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
16
votes
3 answers

Combine two or more (boolean) observables on single ngIf using async pipe

Without observables I can write the following line in the HTML template:
How do I translate this line if all myVar variables are now actually observables?
Sebastian
  • 5,177
  • 4
  • 30
  • 47
14
votes
2 answers

Issue with multiple child HTML elements using Directives in AngularJS

I'm using a template to create a popup menu that will show alerts if there is a new one and it's working till now. But i wanted to add manual alert, that's why i thought to add an input text but Oupss, i can't write on the input field and i don't…
Ayyoub
  • 1,315
  • 1
  • 16
  • 37
13
votes
1 answer

NgModel on Input type file

I'm trying to make a binding to an input field type file through ngModel on the typical Angular way like this: and files:any My problem is that after I have chosen a file, the value of my…
Leonzen
  • 1,195
  • 5
  • 13
  • 30
12
votes
2 answers

Error: Can't bind to 'ngForIn' . Angular 4+

this question has already been said but unfortunately no answer worked for me. Here is my problem (angular 5): I…
mathiasF
  • 267
  • 1
  • 4
  • 14
12
votes
1 answer

All Angular2's template syntax is broken when I open the page through my hashed router

I have a hashed router that is routing from my main page just fine. The problem comes when a new page opens, all the template syntax is broken. That is all data bindings, ngFors, and even [routerLink]. So the pages open without the angular logic but…
Mostafa Fateen
  • 849
  • 1
  • 14
  • 33
12
votes
1 answer

Angularjs templateUrl file location not found

I am locally developing a single page app. I cannot seem to load an HTML file as a template using a simple custom directive in Angularjs. If I attempt to use raw html using the template: attribute, it works just fine but I have over 400 lines of…
DylanH
  • 879
  • 1
  • 7
  • 13
11
votes
1 answer

How can I render content of 1 child from ContentChildren QueryList in Angular2+

I would like to render content from one element in QueryList filled by ContentChildren. Let's say I want to build tab component and this is my template for using such component: some content 1
Makla
  • 9,899
  • 16
  • 72
  • 142
11
votes
3 answers

How to escape single curly braces angular 4 template

I have something like
yada yada.... { ... } blah blah....
Even with 'ngNonBindable' directive I get error: compiler.es5.js:1690 Uncaught Error: Template parse errors: Unexpected character "EOF" (Do you have an…
zion inc
  • 145
  • 1
  • 1
  • 9
11
votes
2 answers

Template IntelliSense

I use C# mostly and one thing that I am missing in VSCode is IntelliSense in Angular 2 templates. I found that there is a solution to this problem here, but I couldn't find a way to integrate it into Visual Studio Code. I need this: Is there any…
coder
  • 658
  • 3
  • 14
  • 31
10
votes
1 answer

ngTemplateOutletContext context source is undefined

That code worked at least with angular 2 if not even with angular < 4.3.6. At the moment gradingKey object is undefined inside the display or edit template. It is not undefined in the getTemplate(gradingKey) method. gradingKey is initialized as…
HelloWorld
  • 4,671
  • 12
  • 46
  • 78
10
votes
3 answers

Loop through array of strings - angular2

Yet very basic thing, but I am unable to figure out how to display array of strings in html template in angular2. .html
  • {{number}}
.ts this.numberOptions= ["I", "II",…
Amit Chigadani
  • 28,482
  • 13
  • 80
  • 98
10
votes
3 answers

Multiple directives asking for template on

Error: [$compile:multidir] Multiple directives [statbox, statbox] asking for template on: (On console) Inside index.html
10
votes
3 answers

AngularJS and Rails routing error

I am following the tutorial at: https://thinkster.io/angular-rails/ and when I get to the section: Integrating the Front-end with the Asset Pipeline, things break; the site gets stuck in an infinite loop and keeps producing the same error over and…
9
votes
6 answers

Angular Material mat-tree get checkbox values

I'm using Angular Material v6.0 MatTreeModule (mat-tree) with checkboxes. But I'm having a hard time figuring out how to determine which nodes have been checked and which nodes have not been checked. In the example by Angular Material, they give the…
1 2
3
44 45