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

learn more… | top users | synonyms (1)

1
vote
0answers
25 views

angularJS: sync re-ordering list with data structure

I am new to AngularJS. I am trying to re-order an array using the Angular ui-sortable plugin. I want the data array to be in the same order as the html ul but can't seem to succeed in this. var ...
2
votes
2answers
26 views

Can i use another template engine with angularjs?

Can i use another template engine with Angular? i googled it and most of it just refer to the current template engine used by angular, i need a template engine with simple logic like "if", "or" .. ...
0
votes
0answers
14 views

Refreshing the browser bypasses angular on routerProvider based URLs

I have a grails app backing an angularjs front-end. They are deployed as a single WAR. I've removed the context path from the app so that it runs on http://localhost:8080. I have a list of articles ...
0
votes
2answers
25 views

AngularJS: textarea bind to JSON object shows “object-object”

I am fairly new to AngularJS. I am trying to bind an object to a textarea. HTML: <textarea rows="5" cols="10" ng-model="menuItem.preset"></textarea> Model: { "kind": "title", ...
1
vote
1answer
16 views

How can I get rid of the hash tag in my AngularJS site URL?

I uploaded an AngularJS site to my gh-pages branch and pointed the DNS A records to 204.232.175.78. Now the site is live but I see a hash tag as part of the URL structure. Here are the two URLs one ...
0
votes
0answers
16 views

Angularjs Function in Controller scope

I have a strange thing: my controller works, but getHash service is called on loading, instead on calling saveit() function on index html: angular.module('myApp.controllers', []) ...
0
votes
0answers
23 views

Angular with Coffescript not working

My prefered development environment is straight coffeescript and this has treated me well until I started getting into AngularJS. For some reason my current setup will not run correctly with ...
1
vote
2answers
22 views

Mixing Angular routing with MVC Partial Views?

I would like to use angular templates for most of my application, but for some pages I'd want to use aspnet mvc controllers and partial views displayed in the ng-view. I've been trying things like ...
0
votes
0answers
8 views

UI Bootstrap's typeahead refuses to iterate through object

According to docs found on official ui-bootstrap, typeahead directive "uses the same, flexible syntax as the select directive" But unfortunatelly it seems that typeahead directive refuses to iterate ...
0
votes
0answers
9 views

$routeProvider resolve session status

So, I'm using angular-http-auth and I have the following flow: On app.run I do Session.getSession(). If the user is not logged in, it will return a 401, and the user will be redirected to /login ...
0
votes
3answers
35 views

javascript array filled strangely

I am writing an app in angular, and creating an array of custom services called Workbooks that each have an array of custom services called Views. I fill the array with a simple for loop, but for some ...
1
vote
2answers
15 views

AngularJs and <select>: Default selected options are removed

I expect the following code to render a drop down list with the third option selected by default. However, when I bind the select with angularjs, the default selection disappears. Any thought? var ...
0
votes
1answer
22 views

AngularJS: writing a capatilize directive does not seem to work

I am new to AngularJS so if i'm completely off track i apologize. Template (which is iterated): <div class="title"> <input ng-model="menuItem.kind" capitalize-first /> ...
0
votes
0answers
24 views

SEO / Search Engine Indexing for Angular JS application

Getting HTML generated by client-side javascript to be indexed in Google is pretty hard. Has anyone found a good solution to this problem that does not involve a re-write of the HTML into something ...
0
votes
2answers
24 views

Button inside ng-repeat to update input in form

What I am trying to do is update an input field from within an ng-repeat. I have an ng-click on the button inside the ng-repeat for each user. When clicking on the button it should update the value of ...
0
votes
0answers
29 views

AngularJS remove tags from around text

I am using Angular JS along with this plugin: http://mir3z.github.io/jquery.texthighlighter/ What I am trying to do is have a tooltip appear after user selects some texts kind of like this website. ...
1
vote
1answer
18 views

Fill select with object datasource

Controller: $scope.obj = { "category": { "value": "1", "synonym": "" }, "name": { "value": "2", "synonym": "" } }; I have html like this: <select ...
0
votes
1answer
14 views

Parsing SVG with AngularJS

I am new both to AngularJS and SVG so if i am doing something terribly wrong i apologize. I am trying to create an SVG pattern with AngularJS: Code fiddle: http://jsfiddle.net/WFxF3/ Template: ...
1
vote
1answer
18 views

Accessing and modifying the models that are initiated in template with angular.js

Fiddle: http://jsfiddle.net/RnJbt/2/ I have a template block, where I initiate a local model, which is not really important to be included in the namespace, but is useful for the template's scope. ...
0
votes
0answers
20 views

Suppress X-Requested-With header in angularJS $http service

I'm trying to implement a client service for server communication in AngularJS. The API responds mainly with JSON, but, for some methods, with plain text. I started using Angular's $resource service, ...
0
votes
2answers
22 views

Service retrieves data from datastore but does not update ui

I have a service which retrieves data from the datastore (Web SQL). Afterwards, it stores the data in a AngularJS array. The problem is that this does not initiate changes to the UI. Contrary, if ...
0
votes
0answers
10 views

What is the best way to handle search spiders with dynamically loaded urls in a rails app?

I have a rails app that uses angular js for front end. In some views, I have a json post object that sometimes contains urls. In my view, it will look something like this // home.html.slim a ...
0
votes
1answer
23 views

Unit Testing directive that adds class to element

I have the following jsbin http://jsbin.com/uvipos/1/edit With a custom directive that adds .active to a parent element if the link it contains is the link to the page we are on (for bootstrap for ...
0
votes
1answer
45 views

one function in 2 controllers[JS]

Here is my question: I've got this little JS programm here in which are 2 controllers.. my problem is I need one function in both controllers (data.duration). Because one time I need the function for ...
0
votes
1answer
14 views

Execute Function After Every Digest Loop Before DOM Render

I would like to execute a piece of code after every $digest loop, after the DOM has been constructed, but before the render. I want this on every $apply, not just the ones after linking/compiling. ...
0
votes
3answers
22 views

Resize IFRAME to Remove Scrollbars

I have an iframe on my page that I want resized every time the contents changes so that there are no scrollbars. The contents of the frame changes frequently without changing the URL. I want all of ...
-4
votes
1answer
47 views

Populating table for more than 20k rows it takes lot of time and page becomes unresponsive when it done [on hold]

My table format is as follows : <tr ng-repeat="friend in friends | orderBy:predicate:reverse"> <td>{{friend.name}}</td> ...
0
votes
0answers
15 views

Query localstorage on page load

I have an angularjs app which, on page load, lists entries from a remote server, within the app, it stores a value which i need to query the web service with. Problem i am having is that when i ...
0
votes
1answer
17 views

Choosing a directive scope

The title may be a bit misleading, but i could not think of a better description. I wrote a directive which includes a ng-repeat: app.directive('appDirective',function($purr){ var template = '' ...
0
votes
1answer
21 views

How to handle plain text server response in AngularJS?

I am new to AngularJS, and building an app that will interact with a server. The server has a REST API, but responds to some methods with plain text, and to others with JSON. I have implemented a ...
0
votes
0answers
18 views

Managing Controller Code not Handled by a Function

I have the following routing defined: app.config(function ($routeProvider) { $routeProvider.when('/', { redirectTo: '/articles' }); $routeProvider.when('/articles', { controller: ...
0
votes
0answers
29 views

AngularUI DatePicker

I am trying to use AngularUI Bootstrap DatePicker (http://angular-ui.github.io/bootstrap/) on my form, and everything is working fine, but when I click on the Next or Previous month buttons, it posts ...
0
votes
0answers
22 views

Angular Directive Variables used in controller

so I have been looking around for information on directives, and there is quite a few people posting, and answering questions. but I am still not finding my answer, and maybe it is because I am trying ...
0
votes
2answers
21 views

Directive that replaces content not working

I have a simple directive that should replace a number with a string but it keeps showing the number. // CS compiled app.directive('stock', [ '$interpolate', function($interpolate) { return { ...
0
votes
2answers
23 views

How to Check Whether an Angular $q promise Is Resolved

I understand that typically one would just attach continuation code with a then() call and chain behavior when using promises. However, I want to kick off a promise-wrapped asynchronous call and then ...
0
votes
1answer
14 views

Using Additional Parameter in Unique Check for Angular Directive

So, I'm looking to create my first angular directive for a validation check. Essentially I want to ensure an user name is unique. This answer is perfect for my first pass, and works as expected for ...
1
vote
2answers
18 views

Private method Unit testing with Jasmine

I was coding test cases for an angular application using jasmine. But many internal methods are declared as private in the services. Example: App.service('productDisplay', function(){ var ...
0
votes
1answer
44 views

Href in angularjs

I am very new to angular... I have some links of the variety <a href='/foo/bar'/> and I would like this to get routed to my rails controller as opposed to handled by angular. I saw two ...
0
votes
0answers
23 views

HAML : Img tag inside anchor tag

Here is guy that made a lot of effort: .picture{:"ng-repeat" => "picture in pictures"} %h2 {{picture.title}} %a{ :ng-href => "pictures/{{$index}}"} %img{:src => ...
0
votes
1answer
25 views

Image loaded event in for ng-src in AngularJS

I have images looking like <img ng-src="dynamically inserted url"/>. When a single image is loaded, I need to apply iScroll refresh() method so that to make image scrollable. What is the best ...
0
votes
2answers
47 views

Angular JS custom filter not working

I'm new, meaning this is my first hour with AngularJS. I'm trying to get a hang of writing custom filters, and here is my first one: http://jsfiddle.net/rutwick/UJTdb/ angular.module('myfilters', ...
0
votes
2answers
43 views

Check/Uncheck checkboxes depending on an array

I have a selected array which will hold all the items that are selected. So when you change a checkbox the item gets added or removed from that array. Problem is that if something else changes the ...
0
votes
2answers
22 views

Redirect all requests in ExpressJS except the main index page?

I'm hosting an ExpressJS/AngularJS site on Heroku, and I'm using Express to redirect all non-https requests to the https version. My problem is- I don't want to redirect the Home page- everything ...
3
votes
0answers
39 views

Morph label into input

What is the proper way in Angular to switch data into "edit mode" where <label>'s get morphed into <input type='text'>'s? I'd like to create and destroy the DOM elements at runtime instead ...
2
votes
1answer
26 views

AngularJS Transclusion of ngRepeat inside custom directive

I am trying to build a custom directive that rearrange its content as a grid. I want to transclude the result of an ngRepeat directive and then reorder the resulting elements. The problem is when I ...
0
votes
3answers
17 views

Angular.js $compile returns array of html but not actual html

I have the following code: app.directive('mySample', function($compile) { return { //template:"<input type='text' ng=model='sampleData'/> {{sampleData}} <br/>" link: ...
0
votes
1answer
21 views

Best (idiomatic) way to refresh data from a service in AngularJS

I am facing a "problem" with AngularJS, services and scope. It is not really a problem (I found a couple of ways to make it work), but I would like to know if I am doing the right thing, or if what ...
1
vote
2answers
18 views

AngularJS initially fill array with true, one for each in model

I want to have an array with values, one 'true' for each object in my model. As you can see in my JSFiddle - Hardcoded working, I have currently hard coded the values, and then it works, i.e. the ...
0
votes
1answer
17 views

AngularJS: Refrain from changing the browser location URL to stop user from bookmarking an error page?

I have a form that I need to submit, if something goes wrong I would like to show an error page, I have a controller and view for this but I would like for the browser location textbox not to change ...
0
votes
0answers
27 views

My apply process in angularjs is broken. How can I fix it

I have a table which rows are rendered with ng-repeat. <tr ng-repeat="item in items" ... My Controller watches the foreign key (fk) of the items. If I change "fk" the items are replaced with ...

1 2 3 4 5 185
15 30 50 per page