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

0
votes
0answers
7 views

angular-ui $stateProvider state changes prevent directives from working

I have just started using the angular-ui ui-date directive. It works fine on my main page, but it no longer works if placed inside a template that gets loaded via a state change ($stateProvider). ...
0
votes
2answers
16 views

Manually trigger Angular data binding for an input field

I'm writing some tests for an Angular directive and I need to simulate user input into an input field. I tried to do this: element.find('input').val('some value').trigger('input'); but it didn't ...
0
votes
2answers
21 views

do not see model value if use directive

I have a directive: app.directive('mydirective', function () { return { scope: { field: '=' }, require: 'ngModel', link: function (scope, element, ...
1
vote
2answers
28 views

Referencing the right name in angularjs directive

So I wrote an angularjs directive to simplify the rendering of a dropdown list: 'use strict'; angular.module('myApp') .directive('filterDropdowns', function () { return { restrict: 'A', ...
0
votes
1answer
19 views

having problems with ng-repeat

I am working on a Rails 3.2.11 app using angular 1.0.5. Currently, a user will select a Cycle from a dropdown, and that will return a bunch of JSON from my controller using ng-resource. Here is the ...
0
votes
2answers
24 views

AngularJS partials with URLs in directives - best practice?

I quite like how angular-ui has created ui-routes, which provides named routes (among other things). Though likely a simple directive to write—a wrapper for ui-view—I am not sure if it is best ...
1
vote
2answers
18 views

Check validity of field within a directive in AngularJS

I'd like to enable / disable a button within a directive based on the validity of a textfield that also lives within the directive without having to know the parent form name (which would make my ...
0
votes
0answers
13 views

AngularJS binding jQuery qTip2 plugin

I am trying to figure out how to bind the content of a tooltip with angular. I have a directive that looks like this: script.js var myApp = angular.module('myApp', []); ...
0
votes
2answers
30 views

AngularJS - what are the major differences in the different ways to declare a service in angular?

I am working on an angularJS app and I am trying to stick with the most efficient and widely accepted styles of development in AngularJs. Currently, I am using this way of declaring my services like ...
-1
votes
0answers
19 views

AngularJS best-practise for inheritance, blocks and other template techniques?

Previously I user of server-side web-frameworks; I have become use to techniques such as: Inheritance, e.g.: everything inherits from layout.html) Blocks/partials, e.g.: include blocks from external ...
0
votes
1answer
13 views

Link route to directive? Or another way?

I have an unusual question. I have this old page that I want to convert to angular.js. http://transience.me/TD/ I have 5 pages worth of html loaded on one page and the only visible portion is the ...
0
votes
0answers
5 views

Testing angularj facebook login directive

I am creating a Facebook login directive based off this blog. app.directive('facebook', function($http) { return { restrict: 'A', scope: true, controller: function($scope, ...
0
votes
1answer
27 views

Angularjs: directive updates view after user logs in

I've got an app with a login screen and a widget on the site showing the user's favorite items in the site. in the site html <header data-ng-controller="SideBarController"> <section ...
0
votes
1answer
29 views

Can I make the transcluded scope of a directive be the same as the parents?

Say I have some html in angular : <input type='text' ng-model='stuff' /> {{stuff}} <button class="primary" ng-click='dothestuff()'>Do the stuff</button> With the following in ...
0
votes
0answers
22 views

add ng-style attribute to template element via another attribute directive in angularjs

I have an attribute directive which I'd like to add to another element directive. I would like the attribute directive to maintain certains styles on the targeted element (specifically height), so I ...

1 2 3 4 5 74
15 30 50 per page