Questions tagged [custom-directive]

64 questions
0
votes
0 answers

Vue custom directive with function in js file

I'm trying to make a custom directive in Vue to be able to use these simple tooltips. I have the tooltip javascript in a js file in the static folder which is required into the main.js file. I've turned it into a function that will run for each…
Linx
  • 753
  • 3
  • 15
  • 34
0
votes
1 answer

Compiling interpolation manually

I have a custom directive and rendering that directive using ng-repeat. what I need is I want to compile interpolation before passing into my custom directive. Find plnkr below https://plnkr.co/edit/bjdBSKCFPhgbE2aREupy?p=preview Here I want to…
0
votes
1 answer

Angular 1 directive does not render inside a directive inside ng-repeat

I'm having issues with Angular directives. My goal is to render a directive mmContentRow for each element in a scope using ng-repeat. That directive mmContentRow has a template where another directive relativeDate is rendered. The problem is that…
0
votes
0 answers

Can we use custom directive which behaves as attribute with html input tag in angular js?

We are trying to enable a feature in html input tag using angular1.x custom directive as attribute,will it work? As per my research i have seen everywhere that custom directive which behaves as attribute always works with div tag.Please give some…
aks
  • 7
  • 6
0
votes
1 answer

calling custom directive of angular js inside popover data-content

I have a written a new directive(showfor) to enable popover in my UI using angular and bootstrap. the "showfor" directive works inside the html, but not inside data-content. I need the popover to show the list(not the entire array). Any kind of help…
0
votes
1 answer

#Angular2 How i can count numbers of custom attribute directive?

I made a custom attr directive and i will use it in siblings elements like:
0
votes
1 answer

Extend Angular Material directive and add class to child node

I'm trying to work around a known bug in Angular Material for autocompletes, where adding any classes to the autocomplete aren't carried down to the md-input-container child elements. Tracked bug here. Following some of the basic instructions on…
0
votes
1 answer

call local variable in element cause not defined error

I try to create the following directive function sortingTableHeader($compile) { return { link: function(scope, element, attrs) { var tableHeaderEles = angular.element(element[0].querySelectorAll('th')); …
Becky.Z
  • 1
  • 3
0
votes
1 answer

Using 'addtocalendar' to add an event in angularJS

I'm trying to learn angularJS. I've a set of objects in an array.I'm creating dynamic content with these objects. Now, when I click on "Add to outlook" button in each of the divs, I need to add them to my outlook. How can I use 'addtocalendar' this…
Sunny
  • 902
  • 3
  • 18
  • 41
0
votes
1 answer

Angular JS - custom directive with ul-li elements as radio buttons and checkboxes

This is a small piece of code which has been written by me and thought it may help some one who are looking for similar functionality: custom directives on li elements - clicking on which they select/unselect the li element and yields the selected…
ajay-annie
  • 13
  • 5
0
votes
0 answers

what is angular js compiler linking function

I am a bit confused about the line taken from Angular JS official documentation: Compile: traverse the DOM and collect all of the directives. The result is a linking function. I am not clear about what linking functions are? Are they talking about…
0
votes
1 answer

Custom directive for searching profiles with dropdown-menu disappears when typing the search-word

I've written a custom directive for searching profiles, which consists of: A title div:
Search Profiles
An input textbox for typing the search words
The result items div:
Shimon Topach
  • 141
  • 10
0
votes
1 answer

How to call a controller function, inside a directive link function using '&' with a parameter?

I'm trying to pass a parameter into a function, inside of a directive link function, similar to this question: Angular: calling controller function inside a directive link function using & However, while I've seen a few examples, like this one:…
James Drinkard
  • 15,342
  • 16
  • 114
  • 137
0
votes
0 answers

Angularjs -Trigger a directive after one directive finished everything

My Requirement I am generating a template through a directive. Here I will pass some data to generate the template. I want to call another directive after the above directive has been finished the render.
Jeeva J
  • 3,173
  • 10
  • 38
  • 85
-1
votes
1 answer

Format and Input number on Input text with custom directive

I am trying to create a directive or pipe that allows me to show formatted an input text as 12.345,67 and too when input numbers with decimal point with enter the decimal comma with comma (,) so 12345,67 not as a period. Obviously, putting the comma…