Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
1 vote
2 answers
40 views

I'm interested in using bootstrap for ui development. But I'm not sure if, what I try to do is achievable. Imagine that I want wanting some Dropdowns Like this one of the bootstrap examples: <div ...
parascus's user avatar
  • 1,269
1 vote
1 answer
320 views

What am I missing here? The template seems to render but the context is empty, resulting in just an empty button being displayed. Written with Angular 18. import { AfterViewInit, Component, ElementRef,...
Aaron R's user avatar
  • 21
2 votes
2 answers
1k views

I have been trying and experimenting with a load of different approaches, but I cannot seem to get it working that my template gets updated. Currently the situation: I have an Angular 19 app, ...
donald23's user avatar
1 vote
1 answer
73 views

With Angular I am using this date time picker in loop and I need to assign a unique reference. So far I hardcode it to req_d1 but it creates some problem. I would like to know how could I set a ...
Pierre's user avatar
  • 1,286
2 votes
2 answers
119 views

I have a query regarding the template variable in angular. Actually I was trying to access multiple elements with the help of the @ViewChildren() decorator. But when I was defining two element with ...
Aakash Giri's user avatar
1 vote
1 answer
555 views

How to pass lists$ from list.component to ng-template im provided code you could see the pipeline of function calls and how the ng-template passes to modal.compoent.html. .................................
someone's user avatar
  • 35
0 votes
0 answers
33 views

An HTML template of my application has 3 div Each of these divs has a specific template variable. Let’s assume the following code: <div class="container"> <div #variable1>Some ...
Olivier's user avatar
  • 445
4 votes
2 answers
3k views

I'm trying to create a carousel component that has n amount of child components based on whatever size list it will get. I want the parent (carousel) to control the styling for children as it ...
lowkey's user avatar
  • 90
3 votes
1 answer
3k views

i am trying to create template reference through ngFor loop. but not works. ts file: import { Component, VERSION } from '@angular/core'; @Component({ selector: 'my-app', templateUrl: './app....
3gwebtrain's user avatar
  • 15.5k
-1 votes
1 answer
54 views

I've written a structural directive which sets the itemTemplate on my custom Select2Component @Directive({ selector: '[bsItemTemplate]' }) export class BsItemTemplateDirective { constructor(private ...
Pieterjan's user avatar
  • 3,709
0 votes
1 answer
1k views

I am trying to show student data in a table according to a selected course in my app.componenet.html: <div class="column"> <app-courses-list #child></app-courses-list&...
pocketGod123's user avatar
0 votes
1 answer
40 views

In Angular I have a long list of words which I display in template as <li> using *ngFor loop. Because the list is so long, I want to make sections by initial letter. The list is already sorted ...
Wintermute's user avatar
-1 votes
1 answer
403 views

Maybe I'm thinking in the completely wrong direction. But what I would like to do is call the value of a variable, which was defined in the template, in the component. <button (click)="...
Lars's user avatar
  • 1,102
0 votes
1 answer
646 views

How can I bind multiple actions to a single Angular output, without creating any additional methods? An example would be updating the value of a formControl based on an output from a custom component ...
Matt Saunders's user avatar
1 vote
0 answers
341 views

I have the following template with a test structural directive called *appUnless: <h1 *appUnless> <app-hello></app-hello> <input type="text" value="hello" /...
user1902183's user avatar
  • 3,407
2 votes
1 answer
1k views

My component has the property transfers$ that is an observable that can comes with an array or an object that contains the error message. I can only input [items] when transfers$ is Transfer[]. But ...
Doug's user avatar
  • 149
0 votes
2 answers
2k views

I have a mega nav menu that is made by looping through a JSON response from server. I want to add a #first template reference variable to the first a tag. (This is so that I can access it from its ...
Andrew Koper's user avatar
  • 7,341
3 votes
1 answer
5k views

Is there a way to access #interface, which is declared inside ng-template element? I must put the <interface-settings inside <ng-template. Because I would need to use the *ngTemplateOutlet. As I ...
user21's user avatar
  • 1,359
0 votes
0 answers
312 views

I'm using angular v9. I'm creating a component and the parameters is a list of items and a callback, in ngOnInit, i call the function group and i reduce the items parameter, and every item, i call the ...
Lucas Buchalla Sesti's user avatar
1 vote
1 answer
284 views

I have an option in select like this: <option [selected]=" impulse === 10 || isTraining " value="10">10</option> When I have any possible value of impulse and isTraining is true my ...
Eljah's user avatar
  • 5,413
0 votes
1 answer
274 views

I have a component which expects some inputs, the input that i care about is the feedList. In the feedList there are feed objects with their own data filled in. However, depending on the feed ...
Csibi Norbert's user avatar
1 vote
0 answers
2k views

EDITED i got reference to a by a template variable in its component. <ng-template #templateLogGroup>Logs Group</ng-template> @ViewChild('templateLogGroup') templateLogGroup : ...
pinale's user avatar
  • 2,254
0 votes
3 answers
171 views

I have an Order object and a Customer Object. The JSON payload for the Order object is like the following: { "order_number" : 1, "customer_id": 1 } And this is the JSON payload for the Customer ...
Reactive_learner's user avatar
0 votes
1 answer
1k views

I have looked into several posts with this kind of problem but did not find a solution. description: Everything is shown with the last object value "profession" on init (model.overview : IOverview) ...
rufreakde's user avatar
  • 652
1 vote
1 answer
58 views

Currently using Angular 8, ended up with a code like this. <div [style.height.px]="dynamicHeightComponent.offsetHeight"> </div> <div #dynamicHeightComponent> ... </div> Is ...
Jalu's user avatar
  • 329
5 votes
1 answer
4k views

In the following code <input #myRef1 /> <input #myRef2 my-custom-attribute /> The #myRef1 will be an ElementRef, and #myRef2 will be MyCustomAttributeComponent directive. Basically, it ...
jsgoupil's user avatar
  • 4,047
2 votes
1 answer
393 views

I want to conditionally show a block only if it contains data, otherwise I will show a noContent block. the data is fetched from the server. <ng-container *ngIf="data$ async as data && ...
xx yy's user avatar
  • 634
0 votes
1 answer
434 views

I have a condition block with ng-container in my Angular html template. The rendered html contains unexplained space for me, how can I work it around? The template part: <...
Eljah's user avatar
  • 5,413
11 votes
1 answer
5k views

I am trying to add the index value with my ids. but getting an error as: Can't bind to 'testid' since it isn't a known property of 'input'. here is my template: <td *ngFor="let col of columns; ...
3gwebtrain's user avatar
  • 15.5k
1 vote
3 answers
2k views

As the title suggests, I have a scenario where, if the "Select All" radio button is checked, it must check all of the radio buttons in the columns below. Unfortunately, this is not working. Here is ...
monstertjie_za's user avatar
10 votes
5 answers
18k views

There are toggle two button (edit and submit), which button should work like toggle show/hide style on click <button (click)="showEditBtn = false;" *ngIf="showEditBtn;"> Edit</button> <...
ShibinRagh's user avatar
  • 6,676
1 vote
3 answers
5k views

I'm setting up ngTemplateOutlet inside *ngFor like in below code snippet <ul> <li *ngFor="let item of list"> <ng-container [ngTemplateOutlet]="item.type"></ng-...
Rakesh Maddala's user avatar
4 votes
1 answer
2k views

I'm using ngx-pipe's percentage pipe twice in a label. Once to determine which color class (success or info) and once to display the percentage. <label class="label" [ngClass]="(item.amount | ...
Han Che's user avatar
  • 8,579
4 votes
2 answers
8k views

In Angular 6/7, I have a component into which I am projecting content like so (ParentComponent template): <my-component [templateNames]="['t1', 't2']"> <ng-template name="t1">...</ng-...
BeetleJuice's user avatar
  • 41.1k
2 votes
0 answers
247 views

I'm new with Angular and I can not find and answer to my question. I want to change the Angular interpolation to make it compatible with Smarty templates, so I changed the default ['{{','}}'] to ['[['...
Javier Moya's user avatar
6 votes
4 answers
7k views

I wonder when do I have to use [(ngModel)] on my input and when I can just use #reference For example <div class="form-group"> <div class="input-group mb-2"> <input type="text" ...
Alexander Tarasenko's user avatar
-2 votes
1 answer
204 views

I am writing a checkout view of a shopping cart where an array is displayed with the items to be purchased like this: app.component.html <div *ngFor="let x of shoppingarray"> <!-- ...
Andrés Sanchez's user avatar