Top "Angular-template" questions

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

Angular: conditional class with *ngClass

What is wrong with my Angular code? I am getting: Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass ... HTML &…

javascript css angular angular-template angular-ng-class
How to use *ngIf else?

I'm using Angular and I want to use *ngIf else (available since version 4) in this example: <div *ngIf="isValid"&…

angular if-statement angular-template
What is the equivalent of ngShow and ngHide in Angular 2+?

I have a number of elements that I want to be visible under certain conditions. In AngularJS I would write &…

angular angular-components angular-template
How and where to use ::ng-deep?

I'm new to Angular 4, so could anyone please explain how and where to use ::ng-deep in Angular 4? Actually I want …

css angular angular-template
Dynamic tabs with user-click chosen components

I'm trying to setup a tab system that allows for components to register themselves (with a title). The first tab …

angular angular-template
Getting reference to child component in parent component

In Angular 2, I have a component that has a child component. However, I want to acquire a copy of that …

angular typescript angular-template
How to use Angular2 templates with *ngFor to create a table out of nested arrays?

Given the following array in component property groups: [ { "name": "pencils", "items": ["red pencil","blue pencil","yellow pencil"] }, { "name": "rubbers", "items": ["…

angular angular2-template angular-template
How to apply multiple template bindings on one element in angular

I'm using template like following: <ul [ngClass]="{dispN: !shwFilter,'list-group':true,'autoS':true,'dispB':shwFilter,'myshddw':true}" style=";display: …

angular angular-directive angular-template
Pass parent scope value into ng-repeat loop in Angular

This should be an extremely simple question, but all of the workarounds I've found are complex. I'm looping through an …

javascript angularjs angular-template