Questions tagged [directive]

A concept of 'command' used by many programming languages and frameworks. Use this tag with a language and/or framework to indicate context. The C/C++ pre-processor is one language that relies heavily on directives. They call it "pragmas".

2065 questions
0
votes
2 answers

how to bind directive scope value to template in angularjs

I am trying to bind the id property value for a div using angularjs directive I want a div container where id of the container will be passed as the parameter from the directive …
dhana lakshmi
  • 847
  • 1
  • 12
  • 29
0
votes
0 answers

How to create a selector method that reprocudes angularjs directive restrictions

I'm trying to create a method that reproduces the selector of angularjs directives: // this method tries to apply a directive on: Attributes (A), Element/tags (E) , css class (C), Comments (M) app.directive("myDirective",{restrict: 'AECM'}) My…
0
votes
1 answer

replace an element depending on it's class (Angular)

I am making a date picker. FR EN Here,…
Kalas Yagami
  • 183
  • 1
  • 20
0
votes
1 answer

Angular js directive render

I'm trying to use the directive uiDateMask but the render don't work someone can help-me? I can't render on mdp-date-picker ... but I render it on input text. its weird!!! …
0
votes
2 answers

Delay creation directive

I am looking to create a delayed creation directive such that I can simply add it to an object like so to allow it to be created some time later like so
Theres lots of things in here
The reason behind this is that…
Chris
  • 26,744
  • 48
  • 193
  • 345
0
votes
0 answers

AngularJs directive-service-controller data circulation

I just couldn't wrap around my head which way is the correct one and couldn't find a straight forward answer sooo... :) I have the data being pulled from a server api and that data is used inside a directive. Problem is that with promises I have to…
MattJ
  • 683
  • 2
  • 10
  • 35
0
votes
2 answers

Form element directive with error message manage AngularJS

I'm trying to create a input directive element with validation. I'd like to manage error status in this directive. There are 3 files Index.html: uses this directive textValid.js: contains directive code textValid.html: contains the directive…
0
votes
1 answer

Angular 1.5 directive loop issue repeating the first element

referring to this plunker: https://plnkr.co/edit/kBoDTXmm2XbxXjpDA4M9?p=preview I am trying to create a directive that takes an array of json objects, syntax highlights them and its that syntax highlighted element in the page. I have had mixed…
0
votes
1 answer

How can I Make my Custom Directive work inside the ng-repeat

I have this directive for my ld Client. I tried to use it inside an ng-repeat but it wont work. What is the problem with this one? how can i make it work? Tried to add the directive outside of ng-repeat and its working. ldClient is a api variable in…
arven
  • 1
  • 2
0
votes
0 answers

AngularJS directive, only render html for some tags

I have this text User has a question: what does

Head

mean? Do you have any idea to use element.append or element.html to render html for this text, but except h1 and other tags?
Phuong Phan
  • 147
  • 1
  • 5
0
votes
1 answer

Apache Velocity: non-latin names of the custom directives

how to do custom velocity directive with localized name. Such directives is ignored now. For example: class MyDirective extends Directive { @Override public String getName() { return "Пример"; } @Override public boolean…
haskell
  • 15
  • 5
0
votes
2 answers

How to pass data from controller to custom directive

I am creating a custom directive in AngularJS. This directive should open a popup to display data. The code for the popup is in another html page and the custom directive injects the code into my main page. I am able to open the popup however I…
user3622488
0
votes
2 answers

Element DOM injected won't start his own directive

I have a
    which contains the directive ng-repeat. Inside it, I have multiple "li" which contains a directive :
  • . The array (A) which serves the directive ng-repeat contains comments. And when the user adds comment, I want…
0
votes
1 answer

AngularJS, change model value with checkbox

I have a bound data variable named 'bool' which has a value of 100. When I click a checkbox I'd like the value to increase by adding 50 to it. What am I doing wrong?

BOOL

meow-meow-meow
  • 508
  • 2
  • 10
  • 26
0
votes
1 answer

how to Trigger the event in Angular when user change the windows height ?

I need to count the element's position each time the user change windows height.so I create a directive. 'use strict'; angular.module "myApp" .directive 'uibPosition',['$position','$document','$timeout', ($position,$document,$timeout)-> …
QI.soa
  • 117
  • 10