angular2-directives Questions
5
Solved
I am new to angular2 and I have been trying to create a resizable div (vertically). but I am unable to achieve that. What I have tried using a directive
and this is my directive
import { Directi...
Tiebold asked 26/9, 2017 at 8:5
2
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">
<...
Kelly asked 4/3, 2017 at 16:12
5
Here are some pieces of code. This same pattern (afaik) works for the hero tutorial.
login.component.html:
<div class="four wide column middle aligned" *ngIf="wrongCredentialsInserted">
&l...
Condominium asked 24/9, 2017 at 10:0
2
Is it possible to detect change in a variable?
I have the following:
@Input('name') name: string;
I would like to call a function whenever change is happened in this variable 'name'.
Is it poss...
Arleyne asked 17/10, 2016 at 2:35
9
Solved
I have an ngFor creating rows in a table that is both filtered and paged.
<tr *ngFor="#d of data.results | filter:filterText | pagination:resultsPerPage:currentPage">
There is another elem...
Trawl asked 17/3, 2016 at 23:45
8
Solved
Im following this tutorial. On the way to get list of users from api.github Im getting error:
Cannot find a differ supporting object '[object Object]'
I think its related to
<ul>
&l...
Overweening asked 26/2, 2016 at 19:42
3
I've been trying to create a typewriter effect in Angular2.
My question basically is what is the best approach. The only way I've been able to do this is through CSS animiations. This does not giv...
Wreak asked 22/12, 2016 at 15:44
8
Solved
I am trying to implement a custom drag and drop directive. It works, but it is extremely slow, and I think the slowness can be tracked to Angular 2 because I've never encountered this slowness befo...
Siblee asked 2/3, 2016 at 19:37
7
Solved
I am new to Angular 2. I need to prevent special characters from being typed in the input field. If I type alphanumerics, it must accept them, while special characters should be blocked. Can anyone...
Pentothal asked 13/7, 2017 at 5:50
5
Solved
I am very new to Angular2 and cant seem to find my answer anywhere. I have an input (as show below) but I only want it to allow the following:
A-Z
a-z
'
-
[SPACE]
I have no idea on how to do th...
Bieber asked 12/6, 2017 at 7:37
1
I am working on the angular application and I am trying to use RxObservable. Below is the sample code.
getMyData(){
console.log('get my account data called');
this.AccountService
.getMyAccountD...
Heliograph asked 9/4, 2018 at 23:47
4
Solved
I upgraded my Angular from 4 to 6, and consequently had a problem with my click-off policy, it stopped working on all components.
my directive:
import { Directive, Output, EventEmitter, ElementRef,...
Fineness asked 25/5, 2018 at 14:15
2
Solved
I have a directive that is creating in code an instance of component template he uses and set its innerHTml, which will change the tempalte dimension:
var factory = this.resolver.resolveComponen...
Methylene asked 27/4, 2017 at 8:18
3
Solved
I have a component whose template looks something like this:
<div [my-custom-directive]>Some content here</div>
I need access to the MyCustomDirective class instance used here. When ...
Viborg asked 31/3, 2016 at 23:35
4
Solved
I am currently learning Angular 2. I understood how to use the Angular Renderer to set an ElementStyle, but now I would like to use the Renderer method:
setElementClass(renderElement: any, ...
Pshaw asked 22/9, 2016 at 12:29
9
I have an odd requirement and was hoping for some help.
I need to focus on the first found invalid input of a form after clicking a button (not submit). The form is rather large, and so the screen...
Gabon asked 15/12, 2016 at 20:43
6
In the given examples of Attribute directives (i.e. a directive to add appearance/behaviour), we have a fairly simple setting of a style on the host element.. e.g.
import {Directive, ElementRef } ...
Jinja asked 10/3, 2016 at 11:38
2
Solved
Very new to Angular 6.
I have declared a directive in AppModule and in the appComponent template if I apply that directive it works, In the app component there is a router outlet in which a lazy l...
Cutie asked 27/6, 2018 at 17:39
4
I recently built the following Angular 2 Read More component. What this component does is collapse and expand long blocks of text with "Read more" and "Read Less" links. Not on the basis of the cha...
Snapback asked 15/6, 2016 at 20:7
2
Solved
Given the following components:
@Component({
selector: 'compA',
template: template: `<compB [item]=item></compB>`
})
export class CompA {
item:any;
updateItem():void {
item[name] ...
Numen asked 6/7, 2017 at 6:48
2
Solved
Suppose I have two directives:
@Directive({
selector: '[appDirective1]'
})
export class Directive1Directive {
public alone = true;
constructor(private element: ElementRef<HTMLInputElement&...
Elephant asked 1/8, 2019 at 15:44
10
Solved
I need to build a readmore directive in Angular2. What this directive will do is for collapse and expand long blocks of text with "Read more" and "Close" links. Not on the basis of the character co...
Avidity asked 14/6, 2016 at 18:14
5
Solved
I have Angular components and first component uses the second one as a directive.
They should share the same model object, which is initialized in the first component.
How can I pass that model to ...
Unkind asked 4/12, 2015 at 12:15
2
Solved
I am trying to use <ng2-smart-table>. The issue is that I don't know how to bind the plus button (addButtonContent) with some create function data. Now this just opens for me anther row to in...
Doty asked 3/11, 2016 at 14:39
3
Solved
I am trying to write a Angular2 attribute directive to modify the behaviour of certain elements. More specifically I want to apply an attribute to certain elements that have click handlers and prev...
Toombs asked 20/7, 2016 at 13:53
© 2022 - 2024 — McMap. All rights reserved.