AngularJS is an open-source JavaScript framework. Its goal is to augment browser-based applications with Model–View–Whatever(MV*) capability and reduce the amount of JavaScript needed to make web applications functional. These types of apps are also frequently known as Single-Page Applications.

learn more… | top users | synonyms (2)

0
votes
0answers
3 views

Putting a “resolve” on an angular-ui-router view isn't working - the page simply doesn't render

$stateProvider .state('root', { url: '', views: { 'root.base': { templateUrl: '/templates/root/root.html' }, 'root.sidebar': { templateUrl: '/templates/root/root-sidebar.html', ...
0
votes
1answer
6 views

How could I create different interceptors for different API-endpoints?

I have 2 Services in AngularJS that for 2 different API-endpoints, they are based on $http service (or simply they are wrappers of $http). Now I have task to create errorHandling for each of the ...
0
votes
0answers
5 views

How to make reusable directive+controller $watch a passed-in scope parameter?

In my parent template I have: <widget-available the-foobar="pageCtrl.foobar" vertical="true"></widget-available> Then in my widget-available controller I have ...
1
vote
0answers
9 views

pass a variable in url to resource callback function in AngularJS

app.factory('Greeter', ['$resource',function($resource){ return $resource( 'http://123.com/processor.php?'+'myvar=1066', {callback: 'JSON_CALLBACK'}, { query: ...
0
votes
1answer
12 views

Using $scope.$watch when using `this` scope in controller

I have a controller in my Angular app: (function (angular) { function MyController() { this.name = 'Dave'; // I want to have code like this: /* ...
0
votes
0answers
4 views

Problems with ng-repeat and ajax-loaded content in directive

I'm creating some directive that wraps up jCarousel plugin. But content for it loading dynamically via ajax. So here are examples of my code: Calling directive in HTML: <div class="jcarousel" ...
0
votes
0answers
4 views

FB login mechanism with an angular client and flask server

I am writing a blogging site. I want to authenticate users using facebook. What is the proper way to authenticate with Facebook if I am using these technologies as my stack ? I just need a very high ...
0
votes
1answer
9 views

Angularjs multiple radio button, auto-select if only one is present

Am successful in building angularjs app of multiple dependent radio button. But have a requirement to default select a radio button if only one is present. Tried out the stuff in Angularjs: radio ...
0
votes
0answers
4 views

Karma + AngularJS + Kendo: Kendo-grid testing is not working

My project is using AngularJS + Kendo-UI. And I'm trying to integrate Karma into the existing project. I can test directives and components that I build is rendered in the test. But when I try to load ...
0
votes
2answers
17 views

Create a record in Rails from AngularJS

I have an Angular application that sends http requests to a rails server. I'd like to make a request to create a record (in the table SavedQueries). The Angular app is actually making a very simple ...
0
votes
0answers
5 views

AngularJS Jasmine 2.0 async testing timed out

I know that this has been asked many times, and I have look at other questions and follow them but I can't seem to resolve this issue. Basically, I have this function from a service that fetch from a ...
1
vote
0answers
9 views

Testing AngularJS services that have dependencies to spy on

The trouble comes when creating the provider for the mock dependency, as it needs to use $q, which is another service within angular, and these cannot be accessed when setting up the provider. ...
2
votes
1answer
9 views

When pulling angularjs controllers out into different files, what if my module doesn't load first?

When my module does not load how can I load it correctly? Suppose I have tens of controllers and I would like to separate each controller into its own file. For this example suppose I have one ...
0
votes
0answers
3 views

Jasmine Testing Angular Controller Method

So I have my blank tests passing with this setup. describe('loginController', function() { var scope, createController; beforeEach(module('souply')); beforeEach(inject(function ($rootScope, ...
0
votes
1answer
12 views

Disable text selection with Angular directive

I am learning JavaScript and AngularJS. I want to disable text selection with Angular Directive. I have a JavaScript code for that function: function clearSelection() { if(document.selection ...
0
votes
0answers
9 views

Angularjs nav active state

I have a navigation in Angularjs which have urls containing ids from a object Now i want to make those navigation items set active if its match with the current location. the template <li ...
0
votes
0answers
11 views

How to initializing jQuery plugins with AngularJS

I am new to AngularJS and I am working my way through an application which loads few jQuery plugins on page load when I load the home page of the application. Now, in that home page I am using ...
0
votes
1answer
15 views

Angular $watch isn't responding to window resize

I have an Angular app set up with a $watch on window.innerHeight and window.innerWidth to adjust an auto-truncate length variable. It works when I initially load or reload the page, but not on page ...
0
votes
1answer
21 views

Angular JS: trigger ng-hide on all elements

I'm working with Angular for the very first time so bare with me. Basically I have a list that when you click on an li, it reveals a hidden list of information about that person. In the footer, ...
0
votes
0answers
9 views

Angular service and where to put and how to work with filtered/paginated data

I use angular-resource. So, I see that is is common to create service that is just resource instance with needed options to work with object. But, I have some filters like orderBy, perPage, page, ...
0
votes
0answers
13 views

Angularjs huge application ng-boilerplate laravel

Im building a HUGE application in angularjs and laravel with around 500 tables and dynamic role security. I want to use ng-boilerplate but it compiles all my js and views into a single file. Will that ...
0
votes
0answers
14 views

AngularJS read configurations at run(deploy) time

I am using Yeoman for scaffolding and grunt for building my application. The issue I am facing is the service urls I am going to access in my ajax calls will be changing in different environments ...
0
votes
1answer
7 views

Text input is using original typed text instead of selected google place autocomplete text

I'm using the Google Maps JavaScript API v3 to autocomplete a text input in my angular/node app. The problem I'm running into is that for some reason, my angular function is using the original typed ...
2
votes
1answer
20 views

Can you use AngularJS with Rails Models

If the title question is unclear, let me clarify. Though the question is conceptual, rather than physical. I have a rails application with a few models (order, buyer). I recently discovered angularjs ...
0
votes
0answers
4 views

http://cc-ng-z.azurewebsites.net/ code download

I need to implement similar to the one hosted in the http://cc-ng-z.azurewebsites.net/ Could any one tell me where I would get the code for the http://cc-ng-z.azurewebsites.net/ site. I am ...
0
votes
0answers
9 views

Access-Control-Allow-Origin issue using Angular %http service

I'm getting the following Angular $http error below : XMLHttpRequest cannot load ...
0
votes
1answer
5 views

$add not working using angularFire

I've started playing around with AngularFire and am experiencing some challenges getting data into my Firebase app. I am using the CDN for both AngularJS and AngularFire/Firebase. Here's the JS: var ...
0
votes
2answers
25 views

ng-if, ng-show or custom directive? Advice on best practice

I'm fairly new to angular so apologies if this is a noob question. Within my small Ionic/Angular app I have a situation where I need to display only 1 of 3 buttons depending on some basic logic. ...
0
votes
2answers
14 views

Angularjs, wait for a nested promise

I have 3 services that return 3 promises, but the third needs the data from the second, so I call it inside the second. I want to wait for all the three promises to be solved, this is the way that I ...
0
votes
1answer
17 views

ng-Grid with ng-repeat horizontal headers

Hey thanks for checking out my question, I am trying to create headers in ng-grid with an ng repeat but horizontally. I am able to the ng-repeat working but the items are repeating vertically. Is it ...
0
votes
1answer
13 views

AngularJS application not downloading file

I have a rails server that generates a csv from an http request, like this: @results = some_json_string require 'csv' csv_string = CSV.open("results.csv","wb") do | csv| ...
1
vote
2answers
13 views

Why does AngularJS with ui-router keep firing the $stateChangeStart event?

I'm trying to block all ui-router state changes until I've authenticated the user: $rootScope.$on('$stateChangeStart', function (event, next, toParams) { if (!authenticated) { ...
0
votes
0answers
9 views

Why won't my ng-include's load template when called in a ui-view?

My routes file looks like: .state('dashboard', { url: '/dashboard' views: appView: templateUrl: '/templates/main.html' dashboardView: templateUrl: ...
0
votes
1answer
17 views

how to make ng-model value set by ui-select value

I am currently using angular-ui/ui-select in my project. I am able to bind the value of the ui-select to an object without issue, however it is binding the entire item that is being iterated over. I ...
0
votes
1answer
21 views

ngOptions isn't showing any options in my select element

I have ngOptions in one of my select elements connected to an array I made in the controller, and it's just not showing any values. I must be doing something stupid. I know for sure that Angular is ...
1
vote
1answer
9 views

Pass a request to a DJANGO REST api using Angular and then return those results in a DJANGO view

Ok, so basically what is happening is I have a search input on my index page. The user types something in the search input, and that is sent to the Django REST api which returns the data in JSON ...
0
votes
1answer
21 views

angularjs pretty url is not working

My problem is url is not working without # . Here is my code : angular.module('Hiren', ['ngRoute']) .config(function ($routeProvider, $locationProvider) { $routeProvider .when('/', { ...
-1
votes
1answer
16 views

Angular directive: watching an expression consisting of variable and function

everyone! Thanks in advance! I have the following problem: I want to watch an input field's attribute, which at the same time is my directive's name, to focus and select the value when a) the area ...
2
votes
1answer
18 views

GET json data from a php file for an Angular scope

I'm trying to get json data from a php file to use within an Angular controller. Im echoing json_encode(pg_fetch_assoc($result)); within the php file and when I console.log($scope.contents); in the ...
0
votes
0answers
28 views

Angularjs changing route param

I am trying to change route parameter without causing a post back in my application which is using Angularjs. My route definition is: .when('/VoucherGrid/:id', { controller: ...
0
votes
0answers
13 views

Angular ui-router ui-sref redirects back to calling page, even though destination page renders correctly

I'm a newb and have to be doing something stupid here, and I can't figure it out for the life of me. Thanks in advance for any help! In short, I have 3 pages that all load correctly when visiting ...
0
votes
1answer
16 views

From Rails to Angular: Are directives used like Rails partials?

I am probably vastly simplifying the use of directives, but to me it seems like templateUrl in directives are much like partials in that you load reusable templates with ...
0
votes
2answers
16 views

How to save DOM manipulation changes?

Part of the code in my controller deletes a DOM element: MetrofficeApp.controller('EmployeesCtrl', function($scope) { ... angular.element(deleteElem).remove(); $scope.$apply(); When I navigate away ...
0
votes
1answer
36 views

Installing a Web Server for Node.js

I'm trying to follow a book I purchased called "Pro Angular JS", and I am having trouble getting a web server pointed to the right port. So I go to the command line, run Node, and the first error I ...
0
votes
1answer
23 views

Providing dynamic value to directive without causing reevaluation in AngularJS

I want to use an AngularJS directive as HTML element, and provide it with two values: One is retrieved by iterating through a collection, and the other one is calculated from that value: ...
1
vote
1answer
11 views

angularjs infinite scroll bottom top

I'm using ngInfiniteScroll, but the default action is to load more items, when the bottom is reached, just like facebook timeline, but I need the opposite, I need to load the items, when the top is ...
0
votes
1answer
14 views

Open/Close multiple modals from a single directive

I'm utilizing multiple modals to guide users through a single form right now, and I've pretty much created a directive that opens/closes a modal for each modal. I've done something like this: ...
0
votes
0answers
4 views

params not working in $stateProvider in angular ui

For the following code sample, the params does not seem to take affect. but if I put the param as part of url then it works fine. Both are supposed to be equivalent. However putting in params ...
0
votes
0answers
8 views

Jasmine Unit Test Can't Find Cordova Plugin

So I'm building a hybrid phonegap app with angularjs through the framework Ionic. So for my unit test with jasmine I'm getting a "can't find variable" error from a call to a cordova installed plugin. ...
0
votes
1answer
29 views

Angular route won't load templateUrl

I can't seem to load the templateUrl using the angularjs routing. Using django and angularjs. What I do is go to 127.0.0.1:8000/phones/, it redirects me to 127.0.0.1:8000/phones/#/ Then, I refresh, ...