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

2
votes
1answer
15 views

AngularJS directive - setting order for multiple directive elements (not priority for directives, but priority for the elements)

Considering this markup with a directive "foo": <div foo run="3"> <div foo run="1"> <div foo run="2"> What is a good approach for causing "foo" to run in the specified order ...
0
votes
0answers
20 views

AngularJS - Share ngModel with nested directives and transcluded directives

I am trying to create 3 directives: .directive('dirOne', function () { return { restrict: 'E', transclude: true, replace: true, controller: function ($scope, ...
0
votes
1answer
18 views

How can one clear the date on AngularStrap's (Bootstrap) bs-datepicker?

Referring to this directive for AngularJS, which wraps Bootstrap's datepicker: http://mgcrea.github.io/angular-strap/#/datepicker I'm unable to find a way to clear the control programmatically once ...
1
vote
0answers
20 views

AngularJS : Directive : Animate sliding pages and postpone controller binding

I'm trying to figure out how to postpone the default controller binding and only apply it from within the directive, once the specific animation (custom - not the angularjs one) has been performed on ...
1
vote
0answers
23 views

Displaying different content within a single view based on the user's role

Let's assume that we have a menu within my angular SPA application, now I want the basic options to be displayed to all of the users, such as home, about us, carrier opportunities etc. I would also ...
0
votes
1answer
23 views

nested function variables AngularJS?

Ok I have the folowwing: function getRate(source, $scope, e) { var dateValue = $("Date", source).text() || ""; if (!dateValue) { ...
3
votes
0answers
46 views

Update model from directive from $apply or $digest cycle in AngularJS

I try update model from directive and have some trouble when $apply or $digest already in progress. And I have some questions: Why scope[attrs.ngModel] is exist, but ngModel.$modelValue isn't exist ...
0
votes
1answer
41 views

How to evaluate an attributes and replace it in a directive?

I'm trying to achieve the following (http://jsfiddle.net/EM8hr/2/), just as an example <section ng-app="Myapp"> <ul ng-controller="MainController"> <li ng-repeat="link in ...
0
votes
2answers
46 views

Angular Directive ng-click Not Working

Plunker I have an external controller that contains a directive inside of its view. The directive gets a list of process points and generates links where you can select each one. It correctly sets ...
0
votes
1answer
35 views

Can you access a global javascript variable in an Angular expression?

Is there a way to access a global JavaScript variable in a Angular expression? such as: ng-disabled="{someJavascriptVariableHere}"
1
vote
2answers
29 views

Why does two way binding sometimes work without using a dot in Angular?

Consider this fiddle: Fiddle 1 When you select a date, you will notice that the text above it is not updating. This is because I had to use an object in my list, like this: Fiddle 2 (simplified). ...
0
votes
1answer
33 views

Conditionally apply ng-class within Angular Directive

I'm fairly new to Angular, I am attempting to wrap a radio input: <input type="radio" ng-model="animal" name="fun" value="dog" radio /> <input type="radio" ng-model="animal" name="fun" ...
0
votes
1answer
19 views

Angularjs ng-repeat race condition in setting dropdown value

I had the problem of getting resource data from an API, loading that into a dropdown select, and setting the selected value of the dropdown. Basically it was trying to set the value of the dropdown ...
0
votes
1answer
17 views

PrettyCheckbox directive for angular app seems to have opposite value

I'm trying to use the prettyCheckbox plugin to apply styling to my checkboxes. For those of you who don't know the plugin works the way that it hides the original checkbox and displays another styled ...
0
votes
1answer
24 views

Angularjs Button loading state directive with ng-disabled directive

I am trying to reconcile using the following directive for changing a button's loading state via bootstrap js plugin: .directive("btnLoading", function() { return function(scope, element, attrs) { ...

1 2 3 4 5 77
15 30 50 per page