Questions tagged [ng-container]

79 questions
0
votes
1 answer

Unable to use ngClass with ng-container to build table, Angular

I have a generic table component and I want to make the row hoverable by binding class using ngClass to a ng-container. However I an error. The code:
Franco
  • 441
  • 3
  • 18
0
votes
1 answer

Static menu inside my children components with routing

I want my static menu to be inside my both children components, how to achieve that? I tried with ng-template, ng-content, ng-container, ngTemplateOutlet directives but I didn't find an example that works with router-outlet. I don't want to…
A. Morel
  • 9,210
  • 4
  • 56
  • 45
0
votes
1 answer

Hey, so is there a way to nest ngTemplateOutlets? I am trying to create a simple customizable modal

I am trying to create a simple customizable modal. Where I can pass via Input() decorator a TemplateRefs and then my component would render that. I am passing 2 TemplateRefs. 1 - The black backdrop, 2 - The dialog box. (I need the backdrop…
0
votes
1 answer

Trying to use ngModel inside of ng-template

I am trying to use ng-template and ng-container, alongside primeng to have dynamic cells in my table:
manjiro sano
  • 784
  • 3
  • 15
0
votes
1 answer

Make grouped rows in table

I have a class with 3 objects in a class that I push in an array and I have to display them grouped in an array like below. Each line has to be an object. The problem is that I can't find a way to display them like this. I don't use angular…
leri
  • 261
  • 1
  • 3
  • 12
0
votes
1 answer

How can a regular (breaking) space be added between items rendered using ng-container and ngFor in Angular to allow word wrapping

When rendering html anchor tags in an ng-container using ngFor, spaces between the tags are removed. The result is that the contents overflow the parent container. I've tried adding a space inside a span and have used but these get removed on…
Alex Cooper
  • 475
  • 3
  • 7
  • 18
0
votes
1 answer

Issues with *ngFor and GridLayout in Nativescript

I have a problem with the grid layout. My code is this one:
0
votes
2 answers

add tootip in mat-tab if using ng-container

I have issues to add tootip in mat-tab if I use ng-container.
Bigeyes
  • 1,508
  • 2
  • 23
  • 42
0
votes
0 answers

Making the label of dynamic field clickable

I'm working on a site with a bunch of form elements that are inserted dynamically from a hard-coded list myFormElements:ElementBase. Each element has a string label, and now I need to make these labels clickable to open a new tab (to an external…
mana
  • 21
  • 6
0
votes
1 answer

Create Angular component that behaves like ng-container

How can an Angular component behave like in that only its content is found in the DOM finally. In particular, if itself is written with content, the content shall end up in the template's slots, e.g. Suppose the template basically…
Harald
  • 4,575
  • 5
  • 33
  • 72
0
votes
0 answers

Mat Cards not rearranging to same line after ngIf filter

I'm trying to understand what part of my code is causing the mat-cards I have on my dashboard to not fill the same row after the toggle button is clicked to fulfill the *ngIf condition. I used the inspect tool on the browser and I think the issue is…
0
votes
0 answers

Build Nested Angular Material MatMenu with *ngFor got errors

I try to build nested(two levels) MatMenu in angular material components, but when I run it in browser, errors occurred. component.html:
0
votes
1 answer

In an Angular *ngFor loop, can I output or render to different / multiple locations in my template?

I have an array of items, each with a category that is sometimes shared. What I want to do is group the items in my template by their category. Currently I'm achieving this by simply looping the array for each category, but that's inefficient. I…
KDill
  • 1
  • 2
0
votes
0 answers

Why are the form inputs in my html table unclickable?

I am trying to render a table in html that is the representation of a reactive form array. I loop over the complex object (FormGroup > FormArray > FormGroup > FormArray) With the final array being the data that we want to represent to the UI in its…