Questions tagged [custom-directive]

64 questions
8
votes
1 answer

Multiple Elements with same custom directive vuejs

Hey there, I have some elements with the same custom directive but different values in my page. I want to get all elements with that directive to process on them. When I use this code: Vue.directive('can', function (value) { …
7
votes
0 answers

Vue directive - passing in string

I have the following custom directive in vue

Your Dashboard

It works fine but would be cleaner without the single quotes. Is this possible?

Your Dashboard

LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
3
votes
1 answer

How to create custom admonitions in custom directive sphinx?

I have created a custom directive 'limitation' in Sphinx which mentions "Limitation" of a certain product. I want that the limitation be written within a colored box that is similar to 'note' or 'warning' directives with 'limitation' written as the…
3
votes
2 answers

ng-repeat not working for list of strings using custom directive

I am working on angular js project in which we are using ng-repeat to display list of strings in cell template created using custom directives. It working fine for list of numbers. But it does not works for list of strings. You can try by changing…
2
votes
0 answers

How can I access binding.expression in Vue 3?

I am not able to find binding.expression in Vue 3 from my custom directive's events. Has it been replaced by something else? I need to access the raw expression to process it rather than the evaluated expression value. Thank you.
geeko
  • 2,649
  • 4
  • 32
  • 59
2
votes
2 answers

I have created a custom directive in angular for for-loop. getting a warning, 'Can't bind to 'appNgLoopOf' since it isn't a known property of 'p'

my-for.directive.ts @Directive({ selector: '[appMyFor]' }) export class MyForDirective implements OnInit, OnChanges { @Input() appMyForOf: Array; constructor(private temRef: TemplateRef, private viewRef: ViewContainerRef) { } …
2
votes
2 answers

Trouble in filter table data between two selected dates using angularjs

I am working on filtering table content based on two selected dates. It do filter the date but result is not correct. dateRange Filter is written in controller. ProductionController angular.module('app').controller('ProductionController', …
Hema
  • 988
  • 1
  • 16
  • 38
2
votes
2 answers

Angular Js ng-repeat with custom directive templateUrl

I'm using a custom directive in angular js with template url the link to code is here. The Problem is ngRpeat is not working with template url if I pass ngRepeat to the element then it does not work but if I pass in the template itself it works.
1
vote
1 answer

Angular 10 custom directive file is not triggering on component loads

In my angular project, I have a custom directive to hide and show the button. I created the directive file and then imported the directive into the shared module.ts file. Components are also available in the shared module only. but on component load…
Sankar S
  • 207
  • 3
  • 12
1
vote
1 answer

Angular Custom Directive

I have more than 5 input text field to accept only comm/dot and only numbers. [(ngModel)]="company.internetbill" [(ngModel)]="company.electricitybill" [(ngModel)]="company.waterbill" etc.. I wrote a custom directive for the above validation. it…
Mario
  • 13
  • 2
1
vote
0 answers

Migrate custom directives with the attributes "link" and "priority" from AngularJS to Angular

I'm trying to migrate a project from AngularJS 1.5.8 to a recent version of Angular (latest stable, hopefully). I'm following the official upgrade guide (https://angular.io/guide/upgrade). Right now I'm stuck in the conversion to component…
1
vote
1 answer

How to create global custom directives in Vue 3 with Typescript

I created the app with the latest Vue cli and I'm trying to register a global custom directive with no success. Can someone maybe tell me what I'm doing wrong here? import { createApp } from "vue"; import App from "./App.vue"; import…
alpercation
  • 23
  • 2
  • 6
1
vote
1 answer

ng-disable not working when I am trying to use custom directive

I am learning AngularJS. I am trying to make a custom directive that checks if email already exists. I get my emails from array that has like 9 users and I can successfully get them using Factory. My problem with my custom directive is that no…
1
vote
0 answers

How to use Custom directive in angular 2

I have followed a tutorial in about creating a custom directive for lazy loading an image in angular 8 as so: import { AfterViewInit, Directive, ElementRef, HostBinding, Input } from '@angular/core'; @Directive({ selector:…
Ibanez1408
  • 4,550
  • 10
  • 59
  • 110
1
vote
1 answer

Storing a variable "gobally" within a class to be used by multiple methods in a graphql directive

So i feel like my question is most likely a JS syntax question regarding classes and this but my issue is directly related to graphql-tools class SchemaDirectiveVisitor which is used for creating custom directives in GraphQL. A little context: When…
xunux
  • 1,531
  • 5
  • 20
  • 33
1
2 3 4 5