angular-template Questions
5
Solved
I would like to make an if-else statement in my angular template. I started with that :
<ng-container *ngIf="contributeur.deb; else newDeb" >
[... HERE IS A RESULT 1]
</ng-container>
...
Skiplane asked 31/5, 2017 at 14:44
24
Solved
I'm using Angular and I want to use *ngIf else (available since version 4) in this example:
<div *ngIf="isValid">
content here ...
</div>
<div *ngIf="!isValid"&...
Reina asked 24/3, 2017 at 18:18
3
My form group structure looks like this (order.component.ts):
this.orderForm = this.formBuilder.group({
customer: this.formBuilder.group({
name: ['', Validators.required],
phone: ['', Validator...
Handwriting asked 21/7, 2018 at 19:49
3
For Example using @if, I am able to do this: @if(items$ | async; as items). I am able to declare 'items' as a variable holding the array of items using the 'as' keyword in the template.
How can I a...
Summerlin asked 14/11, 2023 at 0:18
6
In my Angular app, I'm getting the following error:
Object is possibly 'null'.
The problem is that I'm getting this error not because of some typescript code, but because of this html template...
Fourierism asked 27/12, 2018 at 9:38
6
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 checke...
Infuse asked 10/9, 2018 at 7:35
21
Solved
I looked at similar questions, but none of them helped me.
I am going to receive an object like the following:
[
{
"id": 1,
"name": "Safa",
"email": "[email protected]",
"purpose": "thes...
Felten asked 2/10, 2016 at 16:56
5
Solved
It shows an error with the template,
Errors:
Property 'result' is private and only accessible within class 'upperCaseComponent'
Property 'mymessage' is not declared in 'upperCaseComponent'
m...
Nazarius asked 20/12, 2019 at 6:49
2
Solved
I am starting to learn DOM manipulation in Angular and notice templateRef and its method createEmbeddedView. I am more curious to learn about this method. Now all my question is, how to use the cre...
Landmeier asked 22/12, 2017 at 9:44
5
Solved
I'm creating an Angular component that wraps a native <button> element with some additional features. Buttons do not fire a click event if they're disabled and I want to replicate the same fu...
Scheider asked 21/3, 2018 at 20:11
24
Solved
What is wrong with my Angular code? I am getting the following error:
Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass
<ol>
<li *ngClass="{active: step==...
Lumpen asked 8/2, 2016 at 12:0
7
Solved
How and where can one use ::ng-deep in Angular 4?
Actually I want to overwrite some of the CSS properties of the child components from the parent components. Moreover is it supported on IE11?
Charkha asked 17/10, 2017 at 9:34
23
Solved
I have a number of elements that I want to be visible under certain conditions.
In AngularJS I would write
<div ng-show="myVar">stuff</div>
How can I do this in Angular 2+?
Gunfire asked 23/2, 2016 at 12:50
4
Solved
currently, i am practiced angular 4. when a normal user view this then show public content When A Registered user enter the web page then show edit or some content. how to the best practices show c...
Ought asked 16/10, 2017 at 12:11
2
I tried lots and search numbers of time but I didnt get any solution to disable click on div element. Already question has been asked but they are saying not possible on divs and I want to know onl...
Judoka asked 8/5, 2018 at 13:37
2
Can I comment attribute inside html markup?
I need to do something like that:
<hero-detail
<!--comments goes here-->
hero="currentHero">
</hero-detail>
But this does not wo...
Giordano asked 6/7, 2017 at 12:28
1
Solved
I have a child component which takes type as an input
child component :
export enum PersonTypes {
MALE = 'male',
FEMALE = 'female'
}
@Component({
selector: 'app-child'
})
export class ChildCompo...
Saxe asked 13/10, 2021 at 4:54
1
Solved
I'm trying to make animation callback in angular, and got type error which is easily can be suppressed with type any. I want to understand why AnimationEvent is not accepted by typescript.
My compo...
Cookhouse asked 29/8, 2021 at 7:28
2
Solved
Is it possible to write reusable ng-template? A lot of my components use exactly the same ng-template.
For example:
<kendo-grid>
<kendo-grid-column field="group">
<ng-template ken...
Sublime asked 6/9, 2017 at 10:14
1
I'm in a bind here. Working on refactoring the HTML of a rather messy pile of angular components and their templates.
The catch is that in one particular case, I can't have a parent element in the ...
Olinger asked 29/5, 2021 at 3:57
2
Solved
When ever there is a template error in angular 2, the entire application fails to work.
Shouldn't only the component that had the template that caused the error, fail to work and the rest of the a...
Gryphon asked 27/3, 2017 at 7:49
2
<input matInput placeholder="DD/MM/YYYY" [matDatepicker]="picker" class="modifyDate" NoSpecialChar ngModel #dateCtrl="ngModel" name="datepicker" (click)="picker.open()" id="dtDeparture" required...
Onfre asked 20/12, 2019 at 9:6
2
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">...</...
Fontainebleau asked 20/10, 2018 at 8:35
8
Given the following array in component property groups:
[
{
"name": "pencils",
"items": ["red pencil","blue pencil","yellow pencil"]
},
{
"name": "rubbers",
"items": ["big rubber","small ru...
Blameless asked 29/2, 2016 at 12:46
3
How to declare a dynamic template reference variable inside a ngFor element?
I want to use the popover component from ng-bootstrap, the popover code (with Html binding) is as shown:
<ng-template...
Gregorygregrory asked 8/6, 2017 at 16:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.