0
votes
2answers
43 views

Referencing the element that is calling a controller function Angularjs ( ng-change / ng-blur / ng-* ? )

The original question asked about how to determine which element called the controllers blurr function, but I didn't clarify that I was not specifically asking about ng-blur, but ng-* (ng-change, ...
0
votes
2answers
221 views

AngularJS - stops working when using controllers

So I'm just now starting to get into angularJS and things were fine with tests until I got into using controllers with ng-repeat. It seems that when I use it it just doesn't connect to the controller. ...
3
votes
1answer
572 views

Nested directives - cannot pass args to controller method from child directive in Angularjs

I'm having some trouble with nested directives in angularjs. I want to call a controller method from a directive within another directive and am trying to pass arguments to it, however they are ...
1
vote
1answer
86 views

Sharing a controller scope between two directives with isolate scopes in AngularJS

I have two directives that provide different views on the same set of data. Both of these directives need to rely on central functionality contained in a controller. The controller uses various ...
0
votes
1answer
51 views

Call controller method from directive

I have a button which change the "active" state. First, it loads the status from the server <button active="data.active" ng-click="changeStatus()"></button> directive code: ...
0
votes
1answer
54 views

Update AngularJS Controller Scope from Another Controller/Scope

Hopefully this hasn't been asked.. I looked around and haven't found anything yet. I have a single view that provides the user with a modal dialog (wizard) to create a few things and then save them. ...
0
votes
1answer
38 views

function in child controller called from parent view

I have a settings controllers that is responsible of saving settings of my web app. This SettingsController has a simple $scope.saveSettings method. The settings controller is associated with ...
0
votes
1answer
47 views

How do I create a directive with a controller in a way where the scope will work without having to use $parent in the view?

I need to include a controller as an attribute of my-modal. In my example, showModal is not in scope unless I use $parent.showModal = false. I can't use $parent in the view for the sake of other ...
0
votes
1answer
56 views

Directive Inside another directive. Controller can't watch

I have 2 simple directives... the parent directive: .directive('modal', [function () { return { replace: true, scope: { /* attributes */ }, templateUrl: 'modal.tpl.html', transclude: ...
0
votes
1answer
66 views

Why isolate scope “@” and $apply don't work as expected

I've been studying AngularJS and in particular saw the video: http://www.thinkster.io/pick/IgQdYAAt9V/angularjs-directives-talking-to-controllers This video presents an example of a directive ...
0
votes
1answer
32 views

Angular not scoped method

I am wondering, does all the methods declared in an angular controller have to be added to the scope? is it possible to call a controller method from ng-click="myMethod()", with my method not delared ...
0
votes
1answer
32 views

How to bind a transcluded template to a different controller?

I'm trying to pass a template through a directive to a dynamic controller (known at runtime from the directive perspective). Something like this: <my-dir ctrl="PersonCtrl"> ...
0
votes
1answer
421 views

Re-binding a tree (Wijmo tree) with AngularJS

I am fairly new to AngularJS, and really struggling to re-bind a Wijmo tree (or even a tree implemented using UL and LI elements wth ng-repeat) with new data on changing of value of a Wijmo combobox ...
0
votes
1answer
222 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
0answers
33 views

Using 2 websockets in one Angularjs controller

I have 2 websocket services: one for historical data and another for current event. Before the current event starts, I want to display historical data that loops through the years. Once the event ...
0
votes
0answers
39 views

how to fill combo box on page load in angular js?

I have a page which has two combobox in it. This is my view : <div ng-init="loadComboBox()"> <select class="form-control" ng-model="SelectedItem1" ng-options="employee.FirstName for ...
0
votes
0answers
45 views

getting : undefined is not a function on getting collection from web-api

I have a web api which returns IHttpActionResult(myCollection) on Get. My angular JS controller is has a function : $scope.loadcollection = function($defer, params) { console.log("inside ...
0
votes
0answers
589 views

AngularJS: $scope.array.push() does not update the view, even with $apply

I'm trying to learn AngularJS and there is this thing that I don't understand, which seems like all the internet solved by using $scope.$apply, but I already use it and it does nothing. Basically, I ...
0
votes
0answers
36 views

AngularJS factory and controller

little problem here, i have a controller which communicate with factories, but how can i pass the factory result to a function? Something i tried: .controller('testCtrl', ['$scope', 'foo', 'boo', ...
0
votes
0answers
33 views

Function decomposition of ngTables?

Attempt: $scope.ran_before = false; function table(provider, columns, params, data, parse_data) { params = new ngTableParams ( { page: 1, // show first page ...
0
votes
0answers
33 views

detect which directive calling a method in the controller

is there any way to detect which directive calling a function in the controller without passing any arguments from the directive itself. simple example to demonstrate what i need: controller: ...
0
votes
0answers
760 views

Setting Model in AngularJS Control Not Updating View (something…)

I am experiencing issues with updating values in my AngularJS controller and having them properly reflecting in my model. I have the following form in my view: <form name="formSignIn" ...
0
votes
0answers
254 views

ng-repeat load new updated array model but do not clear the previous value of array in template

I have a list of articles, every article has a list of comments with user.name and user._id of that comment. Click to each user, it shows a chat box to send message to that user. Everything is ok with ...