0
votes
0answers
3 views

Make real async requests for jasmine integration testing

I've got an angular app going with some jasmine testing. I recently added a new method to make a query to elastic search within one of my services, it looks like this. test: function(){ ...
0
votes
0answers
2 views

Create Kendo Grid with initial call to URL then page with different URL

I need to create a Kendo Grid from completely dynamic data. Meaning, the data is dynamic, the schema is dynamic, the column declaration is dynamic. I'm doing this within the AngularJS-Kendo framework. ...
0
votes
0answers
14 views

Angular input directive not working as expected in IE8 and IE9

I am using the input directive in AngularJS and wish to set a min value on it. My understanding is that if a value lower than the min is entered, an error is shown on the ngModelController. I've ...
1
vote
1answer
21 views

Why would you execute $q.when() without passing it a promise/value?

According to the Angular docs on $q, $q.when() expects a promise/value to passed in. But I just came across someone else's code where it's called without passing in any params. Here's a simplified ...
-2
votes
0answers
32 views

Loop through array of objects to find if one value differs

I have an array of objects and want to tell if one of the objects' value differs from the rest. $scope.myArray = [{name:'ted', age:'18', gender: 'm'}, {name:'bob', age:'18', gender: ...
1
vote
1answer
15 views

How to pass parameters using ui-sref in ui-router to controller

I need to pass and recieve two parameters to the state I want to transit to using ui-sref of ui-router. Something like using the link below for transitioning the state to home with foo and bar ...
0
votes
0answers
13 views

How to deploy nodejs, angularjs and apache

I'm working on the seed project now I want to use nodejs as api server listening on port 5001, express as back-end framework, angularjs as front-end framework, and apache as static file ...
0
votes
0answers
11 views

Angular unit testing: $httpBackend.flush() causing $$route be 'undefined'

I am trying to create unit test for server request failure: Test: it('should progress $http on error', function () { httpBackend.whenPOST("/paymentUrl").respond(503); ...
0
votes
0answers
20 views

IE 10/11 returns date&Time as “invalid Date” in AngularJs

I'm trying to render this date and time 9/2/2014, 10:06:38 AM(which is the toLocalString() format) onto an index.html but IE 10 is showing the date as Invalid Date. index.html <tr> <th ...
0
votes
1answer
31 views

How do I get the results of a promise into a scoped variable manually upon promise resolution?

Assume for discussion that I'm building a stock ticker app and I need prices to update every 2 seconds, I have a $resource wrapped over calls to a WebApi, and $scoped variables on my controller that ...
0
votes
2answers
35 views

How do you store a JSON object as a function parameter in Angular

I am using a directive to populate a chart using the AmCharts API. The function that is currently being used lists out the data that is populating the form in JSON format as a parameter in the ...
0
votes
4answers
43 views

calculate the sum of values in ng repeat Angularjs

I am new to Angularjs. I am displaying list of items using ng-repeat. how to calculate the sum of it? is there any simple method to calculate it in html using expression? name numberofyears amount ...
-2
votes
1answer
25 views

How to implement @mention similar to facebook [on hold]

I want to implement @username in the input textbox similar to facebook , when i type @ a dropdown appears and enable the user to select a user. What is the best approach to do it?
0
votes
1answer
14 views

Basic resolve for Angular routing

I'm creating a very basic login system with Angular JS. Basically, after a login form is submitted, credentials are checked against a database using PHP and Mysqli. If all is ok, it returns successful ...
-1
votes
0answers
12 views

grid is not populating of data from directive

I bring data from a controller which bring from .json and I use a directive to build the grid and I show it in the html file this is my html and they are in different files thank you <div ...
0
votes
0answers
18 views

AngularJS transcluded form directive

What I tried to do the last days is something like that: %myform(name='somename' ng-controller='whatever') %myinput(ng-model='user.firstName' ... controller has a user structure with firstName, ...
0
votes
1answer
30 views

Manipulate DOM element every 10th second

How do I manipulate an DOM element every 10th second? I've tried like this: var endurance = angular.element('.progressbar').height(); var endurance2 = angular.element('.progressbar').css('height', ...
0
votes
0answers
10 views

Webcam getUserMedia API - AngularJS bugs?

I've done a webcam directive that uses a service in AngularJS. I've used this example: https://simpl.info/getusermedia/sources/ When I try the example in my tablet it works fine, but when I start my ...
0
votes
2answers
23 views

How to distinguish multiple directives in the same $scope?

I actually call directive functions from controllers like this : function myControllerFunction = function () { $scope.highlight(); } highlight(), being a function in a directive. What if I had ...
0
votes
0answers
22 views

Two Way Binding Not Working In Directive

I have a Directive used as follows : <planner-view ng-controller="plannerController"></planner-view> The template is as follows : <div ng-repeat="day in itinerary" class="day"> ...
1
vote
1answer
15 views

AngularJS directive not inserting values into template when using an isolated scope

Given the following directive: angular.module('news.directives', []) .directive('newsArticle', function($location, $timeout) { return { restrict: 'AE', replace: ...
0
votes
1answer
18 views

Add a new directive inside a ng-repeat

I have an array of data which is displayed using a directive inside a ng-repeat. When the user clicks a button, it'll add a new object in this array so a new instance of that directive must be ...
4
votes
2answers
29 views

IIFE in AngularJS

I've specified a function in my controller like this: $scope.myFunction = function(){ console.log('test'); } I want this function to be triggered when a selectbox has been changed. Therefore I ...
0
votes
1answer
16 views

AngularJS $scope.foo is set with service, but later on in the same controller undefined

I have a service which calls API and gets json response. I inject this service into my controller and try to set $scope.tank variable with this received data. When I try to use this variable later on ...
0
votes
2answers
26 views

JSON object not being accessed using AngularJS

I am just unable to access values from the my json string (image below). { all: [{ info: { name: "Fahad", lat: "41.954815", lon: "-87.647209" } ...
0
votes
3answers
22 views

Get html body height after data load complete from AngularJS

Need to get height of html document (body) , after contents are loaded from some service using AngularJS. /* SHOW RECENT POSTS */ app.controller('RecentPostsController', function ($scope, $http) { ...
0
votes
1answer
20 views

Unknown provider: ngModelProvider

I am trying to inject ngModel in an Angular directive and I get this error: Error: [$injector:unpr] Unknown provider: ngModelProvider <- ngModel ...
0
votes
1answer
24 views

Find parent scope property in Controllers just like in Templates

Is there an easy way to read a property defined in one of the parents scopes from a controller? Just like Angular does in templates, as the docs explains: When Angular evaluates {{name}}, it first ...
0
votes
1answer
22 views

the object is in the array but indexOf doesn't find dit

What i'd like is to replace an element in the object array of $scope.users by another object. I was thinking to do like this: step 1 find the object I want to replace var myValue; myValue = ...
1
vote
0answers
26 views

Angular.js: get different form {{display.value}} and $scope.value from same ng-model

Example form: <select ng-model="coffee.location"> <option display-value='Some verbose message here' value="home">At home</option> <option display-value='Some verbose ...
2
votes
2answers
28 views

Javascript change specific object properties

I have this: $http({ method: "GET", url: myURL }). success(function (data, status) { $scope.data = data.content; //complex object for(i=0;i<$scope.data.length;i++){ ...
0
votes
0answers
21 views

ng-src display:none issue, src works

I have an issue in that when I scroll up my image is appended with display: none at one point (when my pageYOffest is 46) then removed, causing a flashing effect. When I replace the ng-src with src it ...
0
votes
1answer
13 views

Angularjs file upload doesn't work ($files is undefined)

I use danialfarid library fileUpload. https://github.com/danialfarid/angular-file-upload And i do same things like in "Usage article on GitHub page", but i have an error after i chose file: ...
0
votes
0answers
19 views

Render directive in parent controller defined in child controller

Basically i would like to achieve something along the lines of this: <div ng-controller="ParentController as parent"> <render-page-controls></render-page-controls> <div ...
4
votes
1answer
61 views

AngularJS + Single Core CPU = Almost 100% CPU

I've built a large AngularJS application that performed fine on until now. My problem started when some users(with very old computers that have one CPU) complained about the application being ...
0
votes
1answer
20 views

Select Option set default value from list if value match using angularJS

I have html. <select ng-model="user.role" class="form-control" name="role" > <option value="">Select Role</option><option ng-repeat="role in roles" ...
0
votes
0answers
7 views

Angular transclude ng-repeat inside directive

I have a directive that transcludes the original content, parses it, and uses the information in the original content to help build the new content. The gist of it looks like this: .directive('list', ...
1
vote
2answers
27 views

angularjs | remove value of input by clicking on glyphicon within input

I do not know why I can not remove the value by clicking on the remove-icon in the input field. <i ng-hide="search" class="glyphicon glyphicon-filter"></i> <i ...
3
votes
2answers
42 views

Is that possible to call module factory from other javascript [on hold]

I have two javascript files separately and I want to retrieve one from another. So, I created Module factory as below; var module = angular.module('test',[]); module.factory('$result', function() ...
0
votes
0answers
20 views

How to Link MVC Model data with Angular JS Model

I am using MVC Razor View with AngularJS. I am creating the UserMaster object in controller and passing to the view Function AddNewUser() As ActionResult Dim objUser As New UserMaster() ...
1
vote
0answers
102 views

Angular template and .NET Partial Postback

I have a trouble to get angular working with .Net partial postbacks. Question is basically same to this : Re-initialize Angular bindings after partial postback Basically I have a tab on which I have ...
0
votes
1answer
37 views

Application working fine in the browser, blank screen on the phone

I am creating an app using the Ionic Framework, Phonegap and AngularJS. I have a directive, Item. This directive works just fine when running the application in the browser. However, when running ...
1
vote
1answer
25 views

angular js calling ng-init on ng-repeat

I am calling ng-int() on ng-repeat like this: <ul class="title_page1" style="margin:0; padding:0;"> <li ng-init='some(val.id);' ng-repeat="(key,val) in ...
0
votes
0answers
16 views

access angular's ui datepicker bootstrap widget dates

I am using the angular-ui bootstrap plugin (found here: angular-ui.github.io) for a datepicker, like this: <datepicker ng-model='selectedDate' show-weeks='false'></datepicker> Now, ...
0
votes
1answer
28 views

How can I access attribute on Angular directive from the controller?

I have created a starred directive. On this directive I can set object-class="customer". How can I access this attribute from the belonging controller? I want to do different things within the ...
1
vote
1answer
27 views

Avoid saving returned data to ngResource

I have an ngResource object like this: [...].factory('Event', ['$resource', function ($resource) { return $resource('/events/:id', {id: '@id'}, { resume: {url: '/events/:id/resume'}, ...
0
votes
0answers
18 views

AngularJS, expressJS passportJS return user object after social auth

This bugs me for two days and I cannot find good example on the internet for this. I have two routes for facebook authentication using passport js, so I have like: app.get('/auth/facebook', ...
0
votes
1answer
23 views

AngularJS 'otherwise' controller doesn't run if resolution on another controller has failed

Suppose we have routes defined in the config: $routeProvider .when('/person/:person_id', { controller: 'person', templateUrl: 'partials/person.html', resolve: { data: ['api', '$route', ...
0
votes
0answers
11 views

Angularjs Error in loading external jsonfile from server

I am trying to load json file from server .Here is my services.js file angular.module('starter.services', []) /** * A simple example service that returns some data. */ .factory('Friends', ...
0
votes
2answers
36 views

Reading undefined when trying to console.log a $scope variable

So I'm trying to make my first Angular app and so far everything is working good, I'm trying to do a bit of form validation and this is what I have so far: angularsap.js: var app = ...