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
1 answer

Angular 1.5.7 directive two way binding of null object

I have an iscolated scope directive that shares scope with '='. We need to pass an object to the directive. When the object is passed to the directive with it's properties, the directive Works fine and the object, after beeing modified in the…
aplon
  • 445
  • 6
  • 24
0
votes
1 answer

Multiple controllers manipulating content in an Angular directive?

I have a problem I haven't come across before, and I'm completely lost as to how to solve it. I have a container which is used to display success and error messages across a wide variety of views. This container is defined by an Angular directive.…
Allenph
  • 1,875
  • 27
  • 46
0
votes
1 answer

Dynamically loaded javascript of angular not working

I am building an application where my DOM is add dynamically outside of angular world ie. jQuery and also the javascript for that is loaded dynamically. I get $compile from angular.injector method and also the scope and then did used the $compile…
0
votes
1 answer

Infinite loop warning in vue.js

This vue directive: Vue.directive 'datepicker', bind: () -> vm = this.vm key = this.expression datepicker = $(this.el).datepicker todayBtn: 'linked' language: 'de' daysOfWeekDisabled: '0' calendarWeeks: true …
Artisan72
  • 3,052
  • 3
  • 23
  • 30
0
votes
2 answers

The variable declared using 'this' or "var Vm = this" in controller is not reflecting the value when accessed using directive

I am trying out directives in angular. I was trying to use variables with values inside a directive which is declared using this or var Vm = this. But the value of the variable is not showing. When I try to call the variable inside the directive.…
Deepak
  • 305
  • 1
  • 6
  • 18
0
votes
1 answer

asynchronous validator to return a promise but got 'undefined' instead - inside mddialog angular material

I am using Anggular Material mdDialog to show a small Form inside a Dialog Box. I am calling a directive username-available to do asynchronous validation inside it. dialog.tmpl.html:
0
votes
2 answers

Adding ng-model to directive

I have the following directive to reverse geocode a lat & long into a place: /* global app*/ app.directive('reverseGeocode', function () { return { restrict: 'A', template: '
', …
Pex
  • 519
  • 2
  • 12
  • 30
0
votes
0 answers

Unit test with jasmine

I'm working in an angular application and i want to implement a table sort system Here is my ui-table-sort.js (function() { 'use strict'; var dependencies = []; angular.module('uiTable', dependencies) .config(configFn) …
0
votes
1 answer

In directives when bringing in data what does an equal sign mean?

I thought an equal sign means two way binding? As in I'd bring in a value of a camelCased attribute to my directive. What does this = mean then? I'm looking over some more advanced code in a book .directive('contentHandler', function () { return { …
SD Dev
  • 335
  • 3
  • 10
0
votes
1 answer

Unable to import ts file from node-modules folder in Angular2

I have installed Google Map places in my Angular 2 project. npm install angular2-google-map-auto-complete Getting error as cannot find the module: Can anybody help me in specifying the path for the same? Tried with following…
Shoaib Chikate
  • 8,665
  • 12
  • 47
  • 70
0
votes
0 answers

Alternative for #Warning directive im Visual Basic (vb.net)

As no #warning directive exists in Visual Basic like in c# Is there any way to bring a message at compile time? Regards. PS: This question is not a duplicate of #warning directive in VB.net, I want here to discuss about alternative.
elou
  • 1,242
  • 15
  • 21
0
votes
1 answer

QuerySelector is not a function with Angular Directive

I want to hide a directive at the beginning, when it is still creating. In this directive I'm integrating a jquery carousel. This is the directive: return { restrict: 'E', replace: true, scope: true, templateUrl: 'slick.html', …
panagulis72
  • 2,129
  • 6
  • 31
  • 71
0
votes
1 answer

AngularJS dom element depend on condition in directive

I got this simple directive : app.directive('participants',function(){ return{ restrict:'E', scope:{ allParticipants:"=", appendOption:"=" }, templateUrl:'/templates/participants.html', link:…
Chenko47
  • 293
  • 5
  • 10
0
votes
2 answers

Directive template update when scope property updates

I have a component I'm trying to build that accepts a user_id and then loads user information for it in the background, and then drops an element on the page with another directive attached to it. So far this is what I have
Jordan
  • 2,393
  • 4
  • 30
  • 60