How can I access the "content" of a component from within the component class itself?  I would like to do something like this:  <upper>my text to transform to upper case</upper>   How can I get the content or the upper tag within...
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 want this:  <div *ngIf="...">div 1...</div> <div *ngIf="...">div 2...</div> <div *ngIf="...">div 3...</div>   But I don't wanna repeat the *ngIf, so I created my component <my-compo...
I am trying to implement "Anchor Jumping" functionality using JavaScript and Angular 2 in my application, Means user can jump across the section within a page.  As per the client requirement, User can jump(Navigate) the section using of press...
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...
I am new to Angular2. Now i need to restrict the special characters in the input field, if i give numbers and alphabets it must take and special characters should be blocked. Can any one help Please.  I am sharing code here:  In HTML: <md-input-co...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.