0
votes
1answer
37 views

How to copy element from ng repeat scope to outside

I am pretty new to angularjs, and I have spent quite a lot of time on finding the solution but can't find anything. basically, I have a form to add new fields, and there is a list to show all the ...
0
votes
1answer
20 views

binding variables to compiled elements in angular Js

I am dynamically creating an element with angular. When the app initally runs using app.run() the element is created and I compile the element, after compiling the element I add an ng-show="active" ...
0
votes
3answers
15 views

Error ReferenceError: _ is not defined at h.$scope.setSelectedClient?

Here is my controller.js . var animateApp = angular.module('animateApp'); animateApp.controller('portofolioController', ['$scope', function ($scope) { $scope.selectedCategory = []; ...
0
votes
0answers
30 views

Angular JS $scope out of sync when calling a controller

I have trying to get my head around this problem for days, I have a Game with a question and 3 possible answers. When a user clicks the correct/incorrect answer the answer animate and then on end of ...
1
vote
3answers
25 views

angular directive attributes isolate scope undefined outside ng-repeat

I have directive this directive: myApp.directive('myDirective',['$http', function($http) { return { restrict: 'AEC', replace: true, scope: { attr1: '=' , attr2: '=' ...
0
votes
0answers
31 views

Workout on restful services for single page applications

I am just a beginner in Angularjs. I have been trying for consuming WebApi service by angularjs. I am following this 1: ...
0
votes
0answers
25 views

How can I create a directive that will be adding to page a list of other directives?

Lets say I have a list of directives that I already wrote: my-directive1 my-directive2 .... Now, I am creating a new directive that will get a list of directives (my-directive1, my directive2, ...) ...
0
votes
1answer
30 views

Angularjs does not update the data retrieved from the $http service

I'm trying to retrieve some data from a service using Angularjs. Initially, I want to just show the first 10 elements. Then, when the user clicks on a button (with ng-click="next()"), I want the same ...
0
votes
0answers
14 views

AngularJS - Multiple conditions in ng-switch-when

I have a fairly long ng-switch-when statement and some with repeating matches. I've read that angular does not support multiple value ng-switch's (im using v1.2.8) but have found this article: How ...
0
votes
2answers
36 views

Taking function from controller and placing in directive

I've noticed my angular controller is growing and ideally should be used for passing data. I have a function that is currently contained within my controller that is called from my HTML to calculate ...
0
votes
1answer
33 views

AngularJS and Dreamfactory: $resource.save() not saving all the records in loop or in queue

I'm trying to save the data using $resource and for REST API using Dreamfactory. I do have seperate mysql table for multiple addresses as user might have multiple addresses. I'm looping through ...
0
votes
1answer
18 views

Observing input change with AngularJS

I've learned the basics about AngularJS but I've just hit a wall. I want a directive that creates a textbox where I can respond to changes in the value using $observe. I've tried everything I can ...
0
votes
3answers
29 views

Accessing AngularJS variable in view?

Consider basic AngularJS application with just one controller. Inside the controller I have set-up "myVariable" to hold a value "Test". I am given an inline JavaScript code in the view and I need to ...
1
vote
1answer
31 views

Can angularJS manage multiple transclusions inclusion?

I am trying to make a transitive transclusion, or call it “directive inception”. I made this example to illustrate what I am trying to do: http://plnkr.co/edit/0hFFHknDps2krtK1D9ud?p=preview The ...
0
votes
2answers
20 views

Angular writing html to view using scope [duplicate]

I have a html value inside my scope, i need to append it inside a div, how do i do that? Example: $scope.htmlValue = '<p> text text <\p>'; Html : <div> {{ htmlValue }} ...
0
votes
0answers
19 views

How watch the content of a TextAngular text editor for addition/deletion of element?

I've successfully customized a textangular module to add a glossify button using the following code : angular.module('myApp') .controller('ReaderCtrl', ['$scope', '$document', '$log', function ...
0
votes
0answers
15 views

On page load pass user id stored in PHP session to AngularJS controller

My controller method: $scope.u = DbResourceSrv.getDbResource('restful.php', 'user', 1) .then(function(data){ $scope.u = data; angular.forEach($scope.u, function(value, key){ ...
0
votes
2answers
16 views

AngularJS translate dynamic string

I'm using angular-translate module for translation, but i have dynamic string which doesn't get translated. I have tried this ways: {{ data.foo | translate }} This didn't work. And i tried using ...
0
votes
1answer
34 views

Calculating items in JSON using .length

I have a piece of JSON data: "links" : { "linkDetails" : [ { "Name" : "Miss XYZ", "DateOfBirth" : "01/01/1901", "linkEntry" : [ { ...
0
votes
1answer
28 views

How to trigger a controller function after an Animation in Angular JS

I have come to a standstill in terms on threading together a sequence of Animations and then a controller action. What I basically want to do is basically 1. click on a button/div, 2.Trigger an ...
1
vote
1answer
35 views

Angularjs: a factory to share data between controllers

I have an angular.js app with multiple views, and I need to preserve status among view change. So I use a very simple factory to share data. And, in the controllers, I use the factory name to use my ...
0
votes
1answer
31 views

Cannot catch event in AngularJS Controller

I'm trying to implement a user authentication system. I've read about 401 http status code and HTTP Auth Interceptor Module. I've downloaded the module with bower and loaded it in my app module. I'm ...
1
vote
1answer
28 views

directives and scope @

I'm learning the "scope" option in angularjs directives and couldnt figure out why the @ isnt working. YOu can check the code http://jsfiddle.net/gerlstar/Lzgts/. The issue is that the second h4 tag ...
1
vote
2answers
33 views

How to disable checkboxes after specified amount is selected in Angular?

I have checkboxes within loop like below: <li ng-repeat="item in items"> <h2> {{item.better}}</h2> <span>{{item.startTime}}</span> <b> ...
1
vote
1answer
36 views

Binding to an object's property doesn't update when the object is updated

I have several bindings to an object representing a product. However, whenever I update the underlying product object, none of my bindings update. I suspect that this is happening because Angular is ...
1
vote
1answer
41 views

What is the difference between `value` attribute and `ng-value` attributes in angularjs

What is the difference between value and ng-value attributes in angularjs templates? If I use ng-if on the field using value attribute it works properly but if I change the attribute value to ng-value ...
-2
votes
1answer
36 views

Access angualr form in controller

Hi Guys i got into one situation and came up with following solution but don't know if this is correct way of doing it or not? The main disadvantage in this that I have to do this on each form and ...
0
votes
1answer
19 views

directive scope two way binding not working using “=”

i have this very simple directive. you can find the code here In the code, i have used '@' for link in the scope. I am able to get it correctly. But this is not two way binding, so i tried to ...
0
votes
1answer
27 views

Fill a form ng-click Angular js issue

I am developing an application with angular js, I have a table in each row there is an edit button and above the table there is a form, what I need to do is that when user clicks on a specific row ...
0
votes
1answer
9 views

Angular JS executing function $timer within $scope receives TypeError

Why is that when using $timeout in Angular JS that is inside function like the following, works fine. var mytimeout = $timeout(function(){ console.log("MyTimeout Executed"); },2000); ...
2
votes
1answer
37 views

Angular binding model in scope issue?

Hi I am new to the angular js and trying to write the chat application using the socket io and angular js with ionic for android platform. But in my chat page there is one issue. I am trying to bind ...
0
votes
1answer
37 views

AngularJS $scope.push not updating the view from a $http data response

I’m performing a $http request to the 500px API for a set of popular photos. The response object is being returned successfully, and I’m having trouble pushing the returned photo items to the view. ...
0
votes
1answer
23 views

Angular Isolate Scope and Attributes

In the following plunk: http://plnkr.co/edit/ss3HTb?p=info I am attempting to bind an attribute to an isolate scope. However, it is not working. I'm wondering if anyone knows why that is? I've ...
0
votes
1answer
22 views

need two directives per view with 2-way binding to fire watch only once

I've written a pagination control directive that is bound to the view controller on pageNumber and pageSize. When either value updates, the view controller makes the appropriate, paged search and ...
0
votes
1answer
30 views

Angularjs scope.$apply in directive's on scroll listener

I am using the following directive to find out if the user has scrolled to the bottom of the page - 150px and set a scope variable which is being listened to and the following page is loaded. It works ...
0
votes
0answers
21 views

Try to intercept calling any function from rootScope?

What i need is to intercept any function that is called from rootsope or any child scope. So the thing is that i need to track all kind of stuff on my app and send that data to external analytic ...
0
votes
3answers
39 views

Separating functions from Controllers to Directives

I understand that Angular controllers should try not to perform heavy logic calculations. I have a function within my controller that gets a list of 12months from the current month: ...
0
votes
0answers
26 views

Getting $scope.$digest error in chrome

I am facing very strange issue in Chrome, In my application i am printing receipt in other window using Window.open(); Window.print(); However if user ignore opened window and click on print ...
-2
votes
2answers
35 views

How to access $rootScope value defined in one module into another module

I need to understand "How can I access the value of $rootScope value defined in one module into other module?" Below is my code : Index.html <!DOCTYPE html> <html ng-app="myapp"> ...
2
votes
1answer
21 views

Purging sensitive data (password) after use in angularjs

I've a form with "apply signature" button, and each time it asks for signature password to pass it to the signature applet. But in case if user left PC unlocked, and unauthorized person got physical ...
0
votes
2answers
22 views

In Angular, how to make sure that $broadcast listener is loaded when a message is broadcast

I have two controllers in my Angular app. When a certain piece of data updates in one, it sends out a $broadcast event, like so: $scope.updateTableInfo = function (table) { ...
0
votes
1answer
30 views

What could cause Angular not to render with no errors?

So I have a Rails app and I'm starting to add in AngularJS for the front end. Currently I can inspect the page using AngularJS Batarang and I can see my controller's scope's variables just fine. ...
1
vote
1answer
28 views

How to store/communicate global asynchronous data to controllers

The basic premise is this.... I have an application. When the user hits the application, it immediately fetches various information regarding the user from a sharepoint server through an ajax call. ...
1
vote
1answer
34 views

AngularJS $rootScope loses value unless I use promise (trigger.io AJAX request)

So this is quite weird. $rootScope is getting set correctly within a function, but then loses its value. I can only keep the value if I use a promise. (!?) I am using a trigger.io (Forge) AJAX ...
0
votes
0answers
27 views

AngularJS - How do you get full model name all the way back to the $rootScope

I want to get the name of a model going all the way back to the $rootScope. So, something that looks like: $rootScope.ctrlScope.foobar.modelName. I want it to be able to update that model from ...
0
votes
1answer
18 views

dynamically added template using $http controller not working in angularjs

I have the following controller app.controller('PageController', ['$scope', '$http', 'PageService', '$sce', function($scope, $http, PageService, $sce) { ////////changetab is ng-click event ...
0
votes
3answers
31 views

Changing a scope variable in different modules

I have variable called "name" in the $scope namespace($scope.name). I modify this variable from different controllers and from different modules. The code is provided below: var myApp = ...
0
votes
1answer
20 views

'sharing' controllers between modules

I will try to explain this as concisely as I can. I have an app that can't be immediately converted to a single angular app. as a result we have a number of seperate modules that are effectively ...
0
votes
0answers
10 views

angularjs popover dismiss makes the bind loss and how to recover the bind

My problem is I create a popover for controlling the element's width and offset. Here is the screenshot for better understanding. However, the problem is when first click the element (for ...
0
votes
2answers
67 views

Counting number of occurances and incrementing value

I have a JSON file with some data, for example: $scope.expenses = [ { "amount": "100", "SpentOn": "19/04/2014", "IsExpensable": true, }, { "amount": "200", ...