So, the question is fairly simple...  I have a table and some angular logic on it (calculating styles, etc)... specifically I have this on THs  [class.hidden] = "column.group !== 'key-data' && currentTableView !== column.group"...
Basically I'm looking for a way to implement a counterpart to Angular 1.x ngInit directive.  I'm aware of ngOnInit hook and the fact that it is the recommended place for initialization code. I consider ngInit directive a quick, declarative  w...
I have a component to which I am passing a template. Inside of this component I would like to pass context so that I could display data.  @Component({   selector: 'my-component',   providers: [],   template: `     <template [ngTemplateOutl...
I have developed a custom directive which trims value of input controls. Please find the code for the same:  import { Directive, HostListener, Provider } from '@angular/core'; import { NgModel } from '@angular/forms';  @Directive({  s...
Using the   TouchEvent   type in a directive is resulting in the following error in Safari desktop  ReferenceError: Can't find variable: TouchEvent   The Typescript source code is  @HostListener('touchstart', ['$event']) onTouchst...
there a some similiar threads but I couldn't find a suitable answer for my needs. So that direct DOM access should be strictly avoided in angular2 I'm just wondering whats best practice for this.  What I wan't to achieve is a resize of a...
Trying to place a component dynamically to a child element, using a directive.  The component (as template):  @Component({   selector: 'ps-tooltip',   template: `     <div class="ps-tooltip">       <div class="ps-tooltip-...
I have a component which features a set of 3 custom buttons and I want to use these buttons as controls for a sound recorder. I got stuck in the first phase, where I want to change the symbols displayed on the buttons, according to their function. I...
If I have a simple button with a click handler and a custom attribute directive like so:  <button  (click)="save()" attributedirective="project saved">Save</button>   And in my attribute directive I'm using the hostlis...
I have an input with [disabled] depending upon the ngModel of another input. Initially [disabled] is working properly but not when we change the dependant input value, the [disabled] property is not working. How to apply two binding on [disabled] pro...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.