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

1
vote
2answers
16 views

Parent directive controller not available?

I have a directive called <popup> that contains a number of <popup-link>-directives. When a <popup-link> is clicked, the parent <popup> directive should be closed by invoking a ...
0
votes
2answers
40 views

Angular Directive not updating

I am having an issue refreshing/updating an angular directive. Basically there is a Flag button which will make an async call to server and if it's successful, change the property userFlags which ...
0
votes
0answers
4 views

How to get current tab id in facebook tab app

I am currently working on a project in which I have to make a facebook tab app. I have almost completed that part. but now I am getting a problem: first what I have done is that : Created an app at ...
1
vote
0answers
21 views

promise-tracker in AngularJS

I have problems when using promise-tracker. What I want is to track a conversation. And part of my code is following: js: angular.module('myModule', ['ajoslin.promise-tracker']) ...
0
votes
0answers
12 views

Where to put menu when using angular-snap?

I'm using snap.js with AngularJS using the angular-snap.js directive. https://github.com/jtrussell/angular-snap.js I'm also using Andy Joslin's angular-mobile-nav. I'm wondering where I should ...
0
votes
1answer
23 views

How to trigger ng-change in directive test in AngularJS

I have the following AngularJS directive that creates an input element. Input has ng-change attribute that runs doIt() function. In my directive's unit test I want to check if doIt function is called ...
0
votes
1answer
40 views

How to write directive that hooks into ng-click handler

I'm facing a situation in Angular where I sense I'm doing something wrong but I can't find the Angular way to solve it. I'm developing a mobile app. I would like to create a directive let's call it ...
0
votes
0answers
22 views

AngularJS - Create a directive to fire an event (function) when the current element is appended to the DOM

I am trying to find a way to detect when an element is finally appended to DOM? Is there any directive that I can create and attach to that element so it will detect the moment of appending? By ...
0
votes
0answers
15 views

Requiring a directive controller inside another directive

I am using Angular UI Bootstrap Datepicker. I want to add behavior to this component. According to this guide, Extending Directives, I proposed some changes to this component. Changes can be view ...
0
votes
2answers
23 views

Pass form to directive

I want to encapsulate my form fields in a directive so I can simply do this: <div ng-form='myForm'> <my-input name='Email' type='email' label='Email Address' placeholder="Enter email" ...
0
votes
1answer
18 views

AngularJS collapse directive. Collapse all but self

I'm struggling to find the best solution for a collapse/expand directive that behaves like an accordion, ie. only one collapse/expand directive on the page must be open at any one time. What is the ...
0
votes
1answer
25 views

AngularJS - How do I avoid using $timeout to wait for an element to be created?

Here is the idea: So I am trying to use an external library function to create some manipulation in the DOM in one of my controllers that my ng-repeat is connected to. Newest jsFiddle working but ...
0
votes
1answer
14 views

Getting angular form validation to work without using ngSubmit

Here is a simple form with an input that is required: <div ng-controller="MainCtrl"> <form name="add-entry" press-enter="add_entry()"> <input type="text" ng-model="amount" ...
0
votes
1answer
14 views

Passing variable from controller scope to directive

In my controller I've defined $scope.worker which is a plain JS object: { name: 'Peter', phone: 601002003 } I've created a directive: .directive('phoneType', [function () { return { ...
0
votes
2answers
16 views

angularjs: UI not updating inside directive

In the following directive, I do a pretty long running operation, so I want to display a loading spin during that time. I've used ng-show and a isLoading variable on the scope of the directive. ...

1 2 3 4 5 65
15 30 50 per page