0
votes
1answer
24 views

Angular access controller scope from nested directive

this fiddle represents what i am trying to do: http://jsfiddle.net/d1001001/dwqw6/. The grid directive needs to grab some data from controller, but since it's nested in the modal directive, which has ...
0
votes
1answer
38 views

AngularJS - Pass variable from a controller & update from directive

I've set one Plnkr. I want to dynamically add input fields in a directive. The input fields are to be built by a collection from a controller. And change the values of the inputs. But the main problem ...
0
votes
2answers
26 views

How to connect my controller in my directive for inserting data and adding bootstrap select in angular.js?

I'm trying to add data on my select menu using a controller and used ng-options while i have a class defined in my directive to insert the bootstrap-select plugin to the element. The problem is that ...
0
votes
0answers
41 views

How to have page controller execute directive functionality AngularJS

Lets say I have a directive that has an isolate scope and that scope have a method on it. Now is there an Angular way to allow the page controller to be able to call functionality declared in a ...
1
vote
1answer
195 views

Jquery animation in a AngularJS controller or directive?

I have an app in AngularJS and in one of my view I want to implement some JQuery animation..nothing too fancy..just hide/slide of a divs ..those divs are created from ng-reapet loop and I need access ...
0
votes
0answers
72 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
1answer
184 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
69 views

Angular using another directive's controller?

If I have two directives, and need to have one of them use the controller of the other one, what is the best way to accomplish something like that in angular? I'm trying to use the require: ...
1
vote
1answer
29 views

AngularJS: How to set controller's property from a directive when using the “Controller As” syntax?

LIVE DEMO Consider the following example that uses the Controller As syntax: <body ng-app="myApp" ng-controller="MyCtrl as my"> <div> {{ my.message }} </div> <button ...
0
votes
0answers
149 views

angular ui-select2: fire highlight events programmatically (without using JQuery)

is there a way to call highlight events of select2 in a programmatic way? something like "ng-highlight"... that will enable writing the callback function of the item-hover in the controller. ...
0
votes
1answer
37 views

Angularjs two separate ui elements communicating

I have a use case to toggle the view of a form using a button. The button is not nested in the same structure of the form, and is out side the scope of the forms controller. What is the best way to ...
2
votes
1answer
2k views

Sharing data between AngularJS controllers? [duplicate]

How do I store the items I've selected in a checkbox with other controllers? My attempt (see the plnkr for views): script.js (controllers) var myApp = angular.module('myApp', []); ...
3
votes
3answers
4k views

Simple Angular $routeProvider resolve test. What is wrong with this code?

I have created a simple Angular JS $routeProvider resolve test application. It gives the following error: Error: Unknown provider: dataProvider <- data I would appreciate it if someone could ...
0
votes
1answer
830 views

Angular JS delay controller and directive initialization until data is returned from server

My AngularJS app requires some metadata from the server before it can initialize the controller and a handful of directives. I have a service to return the data but have been unable to get the ...
1
vote
2answers
190 views

Angularjs: models binding

I have directive which dynamically creates input tags. I need to get values of created inputs on change event. Instead of it the name attribute on $scope argument in the controller is undefined. How ...

15 30 50 per page