angular2-directives Questions
3
Solved
i'm trying to create custom angular 2 validator directive, which inject NgControl like this :
@Directive({
selector: '[ngModel][customValidator]',
providers: [{provide: NG_VALIDATORS, useExistin...
Warlike asked 1/10, 2016 at 16:42
6
Solved
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 c...
Lynn asked 11/4, 2016 at 10:0
4
Solved
I am creating an application using angular2.
I need to get a Date from user input using a calendar popover, but I need to put a mask on user input to stay in this format dd-mm-YYYY when he is typi...
Chrysalis asked 5/6, 2017 at 18:21
4
Solved
I have an input text field like this
<input type="text" class="form-control" [inputTextFilter]="A" [ngModel]="name">
and my directive is:
import { Directive, Input, HostListener } from '@...
Incorporation asked 19/9, 2017 at 14:9
8
Solved
I want to implement autocomplete feature , so an identical option i found was using multi-select drop-down. So i used this module -
https://www.npmjs.com/package/ng-multiselect-dropdown
But after...
Kisangani asked 22/10, 2018 at 8:50
4
Solved
How do I add more than just one class on the method Renderer2.addClass();
Example:
this.renderer.addClass(this.el.nativeElement, 'btn btn-primary')
When I try to do so I get the error:
ERROR ...
Irkutsk asked 22/2, 2020 at 21:22
2
In Angular 1, it was fairly easy to create a loading directive that replaced content with a spinner and was used like so:
<div isLoading="$scope.contentIsLoading"></div>
Where conten...
Quamash asked 26/6, 2017 at 11:23
9
Solved
What is the difference in Angular 2 between the following snippets:
<div [class.extra-sparkle]="isDelightful">
<div [ngClass]="{'extra-sparkle': isDelightful}">
Qualify asked 26/7, 2017 at 8:33
10
Solved
I am using Angular 4.3.3 with the JIT compiler and get the error below when I run my application:
Property binding ngforOf not used by any directive on an embedded template.
Make sure that the pro...
Kinross asked 31/8, 2017 at 14:40
2
How can I extend the [routerLink] directive from the Angular Router v3 so I can wrap some custom functionality myself? I've taken a look at the RouterLinkWithHref directive and it appears that is w...
Busman asked 11/7, 2016 at 12:16
29
Solved
In my Angular 2 app when I scroll down a page and click the link at the bottom of the page, it does change the route and takes me to the next page but it doesn't scroll to the top of the page. As a...
Naxos asked 20/9, 2016 at 18:13
17
Solved
I am using Material 2 to add md-raised-button. I want to apply this directive only if certain condition becomes true.
For example:
<button md-raised-button="true"></button>
Another...
Illegitimate asked 16/6, 2017 at 19:58
5
Solved
I'm trying to detect when the value of an input changed in a directive. I have the following directive:
import { ElementRef, Directive, Renderer} from '@angular/core';
@Directive({
selector: '...
Monreal asked 18/1, 2017 at 19:39
2
Solved
I want to add a directive to an element from another directive by using the host property, but there doesn't seem to be a way to reference the other directive.
@Directive({
selector: '[one]',
ho...
Prog asked 10/5, 2016 at 20:12
4
Solved
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 ...
Arsine asked 9/7, 2016 at 23:34
4
Solved
I'm trying to figure out how I can access the selector that we pass into the @Component decorator.
For example
@Component({
selector: 'my-component'
})
class MyComponent {
constructor() {
// I w...
Seamaid asked 12/5, 2016 at 13:21
5
Solved
I've been trying to get a draggable div working using Angular 2. I'm using this example from the angular2-examples repo as a starting point, only really adjusting the code to account for the remova...
Cohby asked 29/3, 2016 at 1:14
6
Solved
I am searching on many forums and questions, but nobody seems to ask how to double click ou double tap in Angular/ionic 2 ?
In ionic v1 it was available with on-double-tap (see http://ionicframew...
Rickierickman asked 6/3, 2017 at 10:47
2
We are building an angular 4 component library and one of the components is a Busy component. The purpose of the component is to allow a developer to create an overlay on any given HTML element whi...
Sheathing asked 12/5, 2017 at 18:36
12
Solved
What am I doing wrong?
import {bootstrap, Component} from 'angular2/angular2'
@Component({
selector: 'conf-talks',
template: `<div *ngFor="let talk in talks">
{{talk.title}} by {{talk.sp...
Unripe asked 1/1, 2016 at 23:39
8
Solved
I have just started working with Angular 2.
I was wondering what are the differences between components and directives in Angular 2?
Meldameldoh asked 5/1, 2016 at 13:36
2
Solved
How to dynamically add (inject) a directive into host?
I have a myTooltip directive and I would like to add mdTooltip directive to it's host. I have tried setAttribute() of ElementRef.nativeElemen...
Brooder asked 23/12, 2016 at 8:55
3
Solved
above image is like i want
but i used ag-grid so my output is coming like this below image
i am using ag- grid . i want more spce between 2 rows of grids,which shows that row is seperated.
...
Replete asked 29/9, 2017 at 5:57
3
Solved
How to get in angular 2 the index but increased by 1:
<li *ngFor="let mPrepTasks of project.upcomingMeetingsPrepTask; let i= index; let count = i+ 1;">
<p>Index {{count}}</p>
&l...
Idaliaidalina asked 1/9, 2016 at 15:39
3
Solved
My child-component looks like:
...
@Component({
selector: '[child-component]'
templateUrl: './child.template.html'
})
...
and my parent template like:
<span child-component [someInput]="12...
Gridley asked 4/9, 2018 at 14:56
1 Next >
© 2022 - 2024 — McMap. All rights reserved.