Top "Angular2-directives" questions

Use for questions about Angular 2+ directives

Apply a directive conditionally

I am using Material 2 to add md-raised-button. I want to apply this directive only if certain condition becomes true. For …

angular angular-material angular2-forms angular2-directives angular-material2
How to create a link to external URL in Angular 2

I am new to Angular. I am starting with ver. 2. I need to link to a file://... URL. I tried …

hyperlink angular external angular2-routing angular2-directives
Angular2 How to get reference of HTML elements generated dynamically

I have this inputs generated dynamically: <div *ngFor="let cell of column; let i = index;"> <!-- Material …

angular angular2-template angular2-directives
How to get width of (DOM) Element in Angular2

there a some similiar threads but I couldn't find a suitable answer for my needs. So that direct DOM access …

javascript angular angular2-directives
How to implement ngModel on custom elements?

Given a simple input element I can do this: <input [(ngModel)]="name" /> {{ name }} This doesn't work for my …

angular angular2-template angular2-directives
What is the difference between component and directive?

I have just started working with Angular 2. I was wondering what are the differences between components and directives in Angular 2?

angular components angular-directive angular2-directives
Using a directive to add class to host element

I am currently learning Angular 2. I understood how to use the Angular Renderer to set an ElementStyle, but now I …

angular angular2-directives
How to detect scroll to bottom of html element

I have this element that I'm referencing by Id: let infiniteScrollElement = document.getElementById('th-infinite-scroll-tracker'); I need to listen when the …

angular angular2-template angular2-directives
Detect when input value changed in directive

I'm trying to detect when the value of an input changed in a directive. I have the following directive: import { …

angular angular-directive angular2-directives
NgFor doesn't update data with Pipe in Angular2

In this scenario, I'm displaying a list of students (array) to the view with ngFor: <li *ngFor="#student of …

angular angular2-template angular2-directives angular-pipe