In AngularJS directives are a way to teach HTML new tricks by extending the HTML vocabulary. Directives allow you to manage DOM elements in a declarative pattern, freeing you from low level DOM manipulation tasks.

learn more… | top users | synonyms

3
votes
0answers
966 views

Angular UI select2 directive - updating the model programmatically not reflected on the widget

I'm trying to update select2 model programmatically and for the view to refresh but it doesn't seem to work. Here's a sample plunker forked from the Angular UI project: ...
2
votes
0answers
186 views

AngularJS jquery.flot chart directive DOM collision

i'm working with angular js now for about ke 4 months and despite all the "first step failures" like not emphasising the async way anuglar thinks, I'm facing a problem I don't really understand. It's ...
2
votes
0answers
184 views

AngularJS: 'google-maps': call directive in infoWindow

I'm using http://nlaplante.github.io/angular-google-maps/ to display a map in my angular Application. I have a general controller for my page getting a Json. to display markers, i'm using $watch in ...
2
votes
0answers
295 views

Get validity in Unit test of Angular JS directive

I'm unit testing my directive and doing it like this: describe("myDate", function() { var $compile, $rootScope; var validDate, invalidDate, invalidDateFormat, element; ...
2
votes
0answers
137 views

$sanitize Custom Whitelist

The $sanitize service tells me that All safe tokens (from a whitelist) are then serialized back to properly escaped html string. I want to only display an even smaller subset of HTML (viz ...
2
votes
0answers
368 views

angularjs directive - element.html() breaks transclusion

Reference plunker If I call element.html() in my link function, the transcluded elements no longer compile. That really says it all, and the plunker will demonstrate, but here's the code: ...
2
votes
0answers
273 views

How to bind AngularJS Calendar to a REST resource using MVP

I’m failing to implement the binding between my REST resource and the AngluarJS calendar control. It seems that I’m missing something or just don’t get it logically since all components are working as ...
2
votes
0answers
56 views

Binding Elements in Angular when using Xlink specifications

I have a page which starts with Raw XML and using Angular Directives and CSS to transform that Raw XML into a webpage with editable fields, buttons, and labels. Since a piece of the data is ...
2
votes
0answers
792 views

Karma Runner > Loading bootstrap.js before angular and angular-mocks throws exception

I have an angularjs app with some directives which make use of jquery and bootstrap components. So, in order to test the directives, I have defined the following order of files in karma.unit.conf.js: ...
2
votes
0answers
453 views

AngularJS touchmove event with multiple elements/scope

I am trying to handle a touchmove event for an ng-repeat'ed directive, regardless of where the touchstart occurred. In my present code, if one of the elements detects a touchstart, all touchmove ...
1
vote
0answers
21 views

Form Validation and fields added with $compile

I have a question regarding form validation. It is not working for me in the following scenario: I have a global form, inside the form dynamic fields are rendered using a directive. That directive ...
1
vote
0answers
24 views

Passing an angular format expression to a custom directive attribute

In an effort to wrap my head around AngularJS directives I'm trying to build a custom HTML table out of an arbitrary JSON array of data passed to my custom directives; specifying a header and a ...
1
vote
0answers
19 views

AngularJs: transclude through include

I try to make the directive with dynamic template app.directive('boolInput', function () { 'use strict'; var restrict = 'E', replace = true, template = '<ng-include ...
1
vote
0answers
52 views

Angularjs directive that depends on another

I'm writting a custom directive to bind a html select element to an unordered list. It works just fine with static select elements. However, I couldn't make it work with dynamic selects. Is there a ...
1
vote
0answers
60 views

$compile dynamic id of element in angular directive

For some reason the id in <div class='popup' id = '{{$index}}' is wrong inside its directive. How can i manually $compile the id of an element? .directive('repeater', function() { var linkFn = ...

15 30 50 per page