Tagged Questions

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

Append hash to array stored inside a cookie

It's easy enough to set an array of hashes with angularjs: $cookies.animals = [{type: 'person', says: 'hello'},{type: 'cat', says:'meow}]; console.log($cookies.products) //-> [{type: 'person', ...
0
votes
0answers
3 views

How to set priority of validation when using dirictives to extra validate?

I added extra validation to inputs by adding dirictive. The problem is in validate order, probably. I need this: when required and my-attribute set required will validation will be fired firstly ...
0
votes
0answers
11 views

Using an angular template and links

I'm a bit of an angular baby, but I've been going through this tutorial to make some nifty looking nav buttons. http://onehungrymind.com/build-super-smooth-rollover-angularjs-greensock-timelinelite/ ...
0
votes
0answers
6 views

Firebase Simple Login with twitter

I'm trying to implement twitter login in my angularfire application, and can't seem to figure it out. I've set my callback URL to https://auth.firebase.com/v2/MyFIREBASE/auth/twitter/callback, and the ...
0
votes
0answers
5 views

Grouping ng-grid by non-displayed column

Lets say I have an array of objects of the pattern { name: ... age: ... dept: ... } And I want to show them on an ng-grid, but I only want columns for name and age columnDefs: ...
0
votes
0answers
23 views

How do I throttle $http requests in angularjs?

I'm building a UI for a data importer using angularjs. The angular app is going to be crunching through the input data source (a spreadsheet, or whatever) and sending GETs/POSTs to an API to ...
0
votes
0answers
10 views

ng-repeat using Firebase

I'm trying to do an ng-repeat on some JSON I have imported into Firebase. Here is the HTML: <div class="col-md-4" ng-repeat="place in places"> <h3>{{ place.title }}</h3> ...
0
votes
2answers
23 views

ng-if wrapping a select ng-options breaks ngModel? [duplicate]

This plunker is from Angular ngOptions sample: ngOption/Select Angular Sample However, I added an ngIf to the first select resulting in: <div ng-if="1<2"> Color (null not allowed): ...
0
votes
1answer
3 views

How do I push an angularfire (angular+firebase) project to heroku?

The closest tutorial on heroku to what I'm doing is the node tutorial, but that isn't quite right for my purposes. I've got an angularfire project, with no node stuff going on. How do I handle this? ...
0
votes
0answers
8 views

Ionic list: swipe to remove?

Is there any possibility to implement "swipe-to-remove" (like in Android task-screen) functionality with "ion-list"? I have found "can-swipe" directive that allows to add some buttons which appear ...
0
votes
1answer
14 views

How modify the content of a html table with with a ng-click event outside the table that get data from a RESTFUL API

How can I fill the table using an Angujarjs' click event from outside the table. A click event in a div or button using ng-click get data from a web API and it updates a angular model that should be ...
0
votes
2answers
16 views

Nested array ng-repeat error: [ngRepeat:dupes]

I have an object I'm trying to iterate through and having trouble nesting the ng-repeats $scope.report_data = { data [ system_0: [ 0: "string", 1: 435, 2: "another value" ...
0
votes
3answers
20 views

Defining AngularJS controller arguments

What is the difference between defining a controller like this app.controller('MyCtrl', ['$scope', '$http', function ($scope, $http) { //... } ]); or this? app.controller('MyCtrl', ...
0
votes
0answers
20 views

AngularGWT vs. GWTP

There are different MVP frameworks which can be used for GWT. GWTP is one of them. The big advantage is that it is written entirely in Java and build on top of GWT. AngularGWT is another MVP for ...
0
votes
1answer
22 views

Formatting JSON correctly with Web API Get()

In my web Api project I am using parameterized methods and not calling by method name. I am using $resource in my angular code and this call works perfect. For example this gets me a list of ...
5
votes
0answers
34 views

How do you document AngularJS directives?

Are there any ad hoc standards or tools for documenting AngularJS directives? We're explicitly building pieces of reusable functionality, so we should be able to get their interfaces across to ...
0
votes
1answer
15 views

$httpBackend.flush(); causes Karma to fail

When I run grunt jasmine all my specs pass, but when I run grunt karma Karma basically silently fails since "Warning: Task 'karma:unit' failed. Use --force to continue. Aborted due to warnings." tells ...
0
votes
0answers
11 views

ng-grid not refreshing the model data

I am working on implementing ng-grid into my application. My controller is as shown below. I am updating my model within the getSrAttachments function and trying to display it on my grid. However my ...
0
votes
1answer
26 views

Why is Angular $resource polluting my data?

I have an API returning the following response { "keyA": [1,2,5], "keyB": [3,6,4], "keyC": [3,2,1] } And I'm using a very simple service to access the API endpoint var $module = ...
0
votes
1answer
33 views

Trying to use $http in my Service and getting 'Error: error:unpr Unknown Provider'

I'm building a web app with Angular and slowly transitioning out blocks of jQuery code into Angular code. Basically I'm working on a modal for multiple products. When a button is ng-clicked I want to ...
0
votes
0answers
21 views

angular ng-repeat accessing next item

I'd like to reference the next element is this possible within the ng-repeat directive ? <li ng-repeat="row in rows"> if {{row.someValue}} === {{row+1.someValue}} //Is it poss to ...
1
vote
1answer
17 views

AngularJS redirect not occurring in interceptor

I'm using a very simple interceptor to check responseRejection for 403 Access Forbidden to redirect users to the login, but it doesn't redirect. I can console.log right up to the line before ...
0
votes
3answers
21 views

ng-change for non input elements

I'm binding myCtrl's member mydata to DOM as below <div id="mydiv">{{myCtrl.mydata}}</div> mydata is being fetched asynchronously. $http.get('/mydata.json').success(function (data) { ...
0
votes
1answer
15 views

How to add directive for extra validation properly in angular?

What I need: I need to add extra validation to input by adding attribute to this input. Firstly, my plnkr example is here What I'd tried?: I added directive, so when I add attribute to the input, ...
0
votes
1answer
21 views

View is not loading any data. Can some-one solve?

I've started to learn angular.js a few days back. This doesn't load views in angular.html. I'm not sure what's wrong in the code. angular.html saved in root folder. view1.html and view2.html are ...
0
votes
1answer
16 views

Too many $routeProvider routes in one file, how can I refactor this code?

I was looking for ideas about how to wire up Angular with Express + Node and this article was a tremendous help. The fact that I could do: app.set('views', __dirname + '/views'); And still be able ...
1
vote
2answers
17 views

Unit testing $modal with Jasmine

I have an Angular app with a controller which displays an Angular-Strap modal window during a function call. It functions correctly in Chrome, but I am at a loss getting a valid unit test working. ...
0
votes
3answers
24 views

How to load Second controller on click of button from FirstController in AngualrJS

Question on loading second controller on click of button Can I use controller inside another controller (like my example below) On click of "showMore" div, is it possible to call another controller ...
0
votes
1answer
20 views

AngularJS directive in ng-bind-html

In the application I am working on, a service supplies the app with a json, containing HTML. I output the HTML in a template like this: <div ...
0
votes
0answers
10 views

how to share data between two modules in angular js?

I am new to angular js. I have two modules. I have to use the data entered or updated in the first module within the second module. Can someone help me how to achieve this.
0
votes
0answers
14 views

Rails / Angular: How to test content on page loaded from rails?

Following this article: http://www.angularails.com/articles/how_to_speed_up_your_angularjs_rails_app I've made it so that my app: 1.) in the view, loads data from the rails database put it into an ...
0
votes
0answers
11 views

AngularJS ng-click disables another ng-click error?

I have two ng-clicks in my menu: One toggles the off-canvas navigation, the other one closes it. The toggler works fine, but after I click the other one it doesn't work anymore. Toggler: <div ...
0
votes
1answer
14 views

Angular directive run if scope values update

I have written a directive that sets the child elements of parent element equal to the height of the tallest child element. Here's the directive code: app.directive('equalHeightChildren', ...
0
votes
3answers
16 views

Need to Find the Duration between PageLoad and Click for Next Page in AngularJS

I am new to AngularJS and I want to write a simple function which calculates the number of seconds a user spent on the page from the page loading to them clicking on the 'next' button. So, basically I ...
0
votes
0answers
14 views

Slick popver angular

I have a slick (Ken Wheeler) and now I am trying to add a popover to it. I already had a custom-directive in Angular. Now, the problem is I am adding slides using slickAdd function which adds DOM ...
0
votes
0answers
12 views

angularjs change ng-init value with function

I need to change ng-init value with function in controller <div ng-app ng-controller="FilterManager" data-ng-init="FilterVisible=false;" > <p>name: {{ FilterVisible}}</p> ...
0
votes
4answers
39 views

How can I dynamicly change the <title> tag?

Please I wanna know how to change the inside the dynamically in angularjs. I'm using the NGresource and pulling json data from the back-end and i want to change it dynamically then i go to a new ...
0
votes
1answer
12 views

Stateprovider $state not working in ionic framework

I am trying to set my login page as initial state. When user clicks on register user, I am doing $state.go (in controller) to register page from where user should be able to come back to login page. ...
1
vote
2answers
25 views

Waiting for a promise to be resolved in a different controller

I'm struggling to AngularJS trying to get a piece of code delayed until a promised will be resolved. My promise is being called and executed in Controller A, but i need a piece of code from ...
0
votes
0answers
6 views

angular-ui-mobile scrollable AND fixed block

I've got a template like this: <div ng-controller="ProductController"> <div class="scrollable"> <div class="scrollable-content container-fluid section"> [...] // some ...
1
vote
0answers
31 views

Add to array in JSON representing keyed server data in AngularJS?

I have a application where we have a survey that we want to add rules and conditions to. As a result I am trying to add values to a JSON object that is returned to the client upon loading. I am using ...
1
vote
1answer
11 views

Multiple ng-init scope issues

I'm trying to use ng-include with ng-init to re-use the same component by only changing its data. The component code ("slider.html", which has no controller) looks like this: <div ...
0
votes
0answers
8 views

Angular UI accordion ng-class conditional

Is it possible using the angular Bootstrap UI to have an accordion default to open if the content within the accordion is empty? for example I have this now: <i class="pull-right glyphicon" ...
1
vote
0answers
31 views

AngularJS: Infinite scroll w/ <table>

I have infinite scroll working w/ one set of data properly. When I'm doing a similar task (image index) using an HTML table, the loadMore() function is being called far too often. Generally one light ...
0
votes
0answers
26 views

Is there a way to pass a variable with curly brace template tags through a method?

I have an ng-repeat where I run an ng-if with a method that checks to see if certain parameters match between two sets of data. If there's a match, it updates $scope with the current match, which I ...
1
vote
1answer
29 views

AngularJS - ng-repeat on non array object

I know that ng-repeat works only on array. My problem is when I don't know if the object that I get from the server, is array, or only object. I need to determine dynamically if it's array or ...
0
votes
1answer
13 views

how to add a row to ngTable

I am trying to add data from a typeahead selection to rows in a ngTable. I was using a regular bootstrap table for this but I needed to be able to edit the data after the row was added. INgTable has ...
0
votes
0answers
10 views

AngularJS Display PDF (byte[]) received from Spring @RestController

My my requirement is to either display(new tab)/download/embed a PDF in my angular js app on form submit/post. I do not want the server to return a unique identifier of the generated PDF and than ...
0
votes
0answers
5 views

Firefox Add-on development: How to use angularjs $http for AJAX reqeust

Some one use angualrjs $http object inside firefox add on? I can't use it becouse return me VOID error message. I have alredy give this permission in json package: "permissions": { ...
0
votes
0answers
29 views

AngularJS, Select and binding to value

I have a scenario that I thought it is logical, but seems angular doesn't support it. So, I have in the scope/controller a list of user types as array of objects like this: $scope.userTypes = [{text ...