Questions tagged [custom-directive]

64 questions
0
votes
0 answers

Why does ng-repeat does not accept data from an eventListner inside a link function of a custom directive?

I am working on a formbuilder and my app needs drag and drop funtionality. I am using a custom directive for the droppable area, and two way data binding for the eventlistner. But the problem is I cannot render data from an array inside the…
0
votes
1 answer

How to apply mask to a default value in Typescript

I have a mask-phone directive that works perfectly in the input when the user write a value, but I need to set a default value and I don't know how to apply the mask directive in the component method. The value is show it in the input without the…
0
votes
0 answers

Avoid scope variable change in all instance of AngularJS directive

I am currently learning AngularJS at the moment and was wondering if someone would be able to help me.. I have this directive that shows/hide a specific icon element after the input element, however when I have three inputs stacked above each other,…
0
votes
2 answers

How to use a custom attribute directive with [ngClass]?

I have defined a custom attribute directive: import { Directive, ElementRef } from '@angular/core'; @Directive({ selector: '.vvdirective' }) export class VVdirectiveDirective { constructor(private elRef: ElementRef) {} ngOnInit() { …
vvauban
  • 165
  • 4
  • 8
0
votes
0 answers

How can i Append a html code to the input field from custom directive in angular

i am trying to show errors for the fields in angular forms: i am able to get the error when we make a changes in the form field and print it in the console but i am not able to append that into the html: app.component.html:
0
votes
0 answers

Scope in Custom directive is not listening to the change in the scope of controller

What i want:--- i want to disable few links present at login page until and unless correct password is given. I can make them hide but since i am learning i want to learn how this can be done. Enabling of the disabled links will happen on click of…
0
votes
2 answers

Multiple file upload using custom directive in Angular

I am trying to create a custom directive to validate multiple file upload.But in custom Directive, control is just returning the last file's details instead of array. Below is the code : File-upload.html :
0
votes
0 answers

Is there a way to disable the .highcharts-axis highcharts-yaxis || highcharts-axis-resizer duplicate behaviour?

Sample image On dragging the Y-axis(highcharts-axis-resizer) to change the aspect ratio of the graphs, sometimes a duplicate axis (even multiple) of the same group and the classs is generated and is non functional which persists even on changing the…
Sunny
  • 235
  • 4
  • 17
0
votes
1 answer

Is there a built-in Angular lostfocus event?

So I went ahead and implemented a custom directive: @Directive({ selector: 'input[applostfocus]' }) export class LostFocus { @Output() applostfocus = new EventEmitter(); @HostListener('focusout', ['$event.target' ]) …
LuckyLikey
  • 3,504
  • 1
  • 31
  • 54
0
votes
1 answer

How to disable the custom directive action on the first column of the table row?

I have a custom directive which opens the table row related data in a new window. When i click on the first column of the table row which is a checkbox selection, it is opening a new window, how should i avoid the custom directive actions on first…
0
votes
0 answers

Angular 4: Custom directive content not rendering for innerHTML

I was trying to create dynamic tree view component in angular 4. I have an array which have the data to form the dynamic tree view. I tried to create a custom directive to achieve this. Here is my code : import { Directive,ElementRef, Input,…
0
votes
2 answers

custom directive - Angular 2/4/5

currently using angular 5 cli. i don't know why my custom directive not working. and not even showing error in my console. am trying to some style to maintain full image width. so far. import { Directive,ElementRef,Renderer } from…
Mr. Learner
  • 978
  • 2
  • 18
  • 48
0
votes
1 answer

How do i check html binding before create directive angularjs

A page, i called custom select-box directive to show Month and that directive need some arguments:
vuvietkien
  • 19
  • 3
0
votes
0 answers

pass web service data to custom directive in angular js

I have created one custom directive for multi-select in angular js and I'm passing data to multi-select directive as below: and scope in my js…
0
votes
0 answers

Load partial pages using custom-directive in AngularJS

I have nav-bar containing links link 1, link 2. On selection of each link I want to inject partial page in the content section. I want to achieve this using Custom-directive in AngularJS. I searched and got this piece of code snippet. But again,…
mayank bisht
  • 618
  • 3
  • 14
  • 43