0
votes
1answer
24 views

Is using javascript setters and getter properties to watch for changes a bad idea?

Using Object.create one can define setter and getter methods in javascript. o = Object.create(Object.prototype, { fooBar: { get: function() { return "Meh" }, set: function(value) { ...
0
votes
0answers
11 views

Using inline content as template with ng-view

I am writing a simple app that uses AngularJS and ng-view to provide a single page app, whilst also having a non-Javascript fallback. The backend is written in PHP using Silex. The backend is written ...
0
votes
0answers
16 views

The scope.$watch item doens't work for fields of javascript objects

I faced with problem of watching properties of java script objects. Partially I described this problem here, but I didn't get solution... I will describe the problem another way. Here is fiddle Here ...
0
votes
1answer
12 views

Get json object with specific condition from an array of json objects using restangular

If I am getting data from a json api (playlists.json), and the playlist object has a user_id data field, how can I get a specific playlist with user_id == 1? I tried doing: var playlists = ...
0
votes
1answer
25 views

Where do you put the form element if you have editable rows of a table in AngularJS?

We have a table(A) and we want a specific row to become editable on click. Currently we have a directive that inserts a new table into the td of table(A) where it is called. We do this so we can use ...
0
votes
1answer
9 views

What format should data be in for a Dangle JS graph?

I am using dangle.js, a visualization tool built for Angular JS based on D3. I am trying to output a graph by calling the directive with the html <fs-area bind="data" on-click="filterByDate" /> ...
0
votes
0answers
15 views

Show multiple toastr notification simultaneously with in loop in angular JS

I am using a toastr.js for notification as small popup,some time i require to show multiple popups with in for loop in a same(single) $digest cycle of angular js, but problem is that when i tried it ...
0
votes
1answer
19 views

Expand/Collapse child elements of tree (AngularJS)

I'm new in Angualr and have a problem. I need to create message history tree, which will provide expand/collapse on parent item. I create view: <div class="tree"> <ul> <li ...
1
vote
1answer
19 views

Animating new ng-grid rows

How can I animate a newly created row in ng-grid? What I would like is that when new data comes in from the server, it is added to the beginning of the grid, and that row then glows for a few ...
1
vote
1answer
20 views

Angular UI-Router Thinks Every URL Is Unmatched And Redirects

In my HTML, I have the following two links, but when I click them or try to enter them into the browser, my new ui-router code is redirecting them to the otherwise url I have specified. Why is this? ...
1
vote
0answers
15 views

Edit arrays using angular-xeditable

I pull some objects from my api using ngResource an then I show them in a table. Thats ok.. the problem become when I try to make 'tags' attribute editable using angular-xeditable but are treated as ...
0
votes
2answers
32 views

Is it possible to add angular custom validation constraints conditionally?

The ng-required attribute is helpful to make a field required based on a condition: <input ... ng-required="object.isRequired" \> But how can this type of use be extended into using my own ...
0
votes
1answer
22 views

ng-show is not working in table while the same statement working in div body

I have two tables inside a div element. I want to hide both the tables when template loads. and want to show them based on conditions. for this i created two tables inside a div and placed ng-show ...
3
votes
1answer
25 views

CSS Float and AngularJS

I'm trying to control the sort order of divs on a page using a JSON object with a property of sort: var json = { modules: [{ css: 'small', header: 'MES', sort: '2', elements: [{ ...
0
votes
0answers
20 views

out-of-the-box javescript tool to create a visual tree from a json format

I am looking for an out of the box javascript code that generates a VISUAL tree out of a JSON. I found A LOT of online tools that do that, but non of them share their code, and i need to use it in my ...
0
votes
0answers
4 views

How come fb.canvas.scrollTo works, but not fb.canvas.setSize?

I first resize the page when the loading is done: FB.Canvas.setDoneLoading( function(response) { console.log(FB.Canvas.setSize()); }); This returns true and resizes the window. Later on, ...
1
vote
1answer
22 views

AngularJS hashbang mode duplicating URL path

I'm working on a AngularJS app with a Laravel 4 backend. I've recently had to switch to hashbang mode from html5 in the $locationProvider service in order to support IE. The application works, but the ...
2
votes
0answers
23 views

Graceful degradation with angular/ rails

I have two versions of a page: one written using angular, another without any javascript at all. How could I get rails to detect if the client has javascript disabled (or is a googlebot) and serve up ...
0
votes
1answer
35 views

Find an object in a list based on attribute value in Angular JS

Is there a simple way to find an object in a list based on an attribute value, without looping on the list? For example given a list like the following : var lst = [{name : "foo", value : ...
0
votes
3answers
45 views

How to populate Angularjs $scope variable in javascript?

mapApp.controller("myController", function ($scope,$http) { $scope.namePlaceHolder= "Name"; $scope.name = ""; }; I bound a scope variable to an html input as follows. ...
1
vote
1answer
30 views

Angular: Simple routing

I have a simple application that has many different variations of one block. I want to implement simple routing with Angular. For example for the URL #/page1 main block of the page should load ...
1
vote
3answers
33 views

How to get Access Token from ASP.Net Web API 2 via AngularJS $http?

I try like this: $http({ method: 'POST', url: '/token', data: { username: $scope.username, password: $scope.password, grant_type: 'password' } }).success(function (data, status, headers, config) { ...
0
votes
0answers
10 views

Random jquery mobile / angular internal errors with android browser

I've implemented a html5 webapp using jquery-mobile, angularjs and the jqm angular adapter. On android devices using the default android browser (chrome works fine!) I randomly experience errors in ...
2
votes
3answers
62 views

What makes Angular and Backbone different from jQuery?

I have been using JavaScript and jQuery for quite a while now and want to extend my skill set further, during my search I came across two popular names Angular and Backbone and while reading about ...
2
votes
3answers
44 views

Function apply with arguments using slice

Looking at this tutorial I saw the following code suggestion in one comment: init:function(callback){ var that =this ; return $http.jsonp(this.url).success( ...
1
vote
1answer
26 views

Triggering CSS transitions, using styles from Javascript, from inside directive with done callback

I'm trying to write a directive to move an element from one position on screen to another on click, using a CSS transition, where the position is determined by Javascript / attribute on the element, ...
0
votes
1answer
21 views

parameter in function of ng-click not found

I have the following code: <a href ng-click='navigateTo("/blog/1000")'> {{ blog.blogId}} </a> <a href ng-click='navigateTo("/blog/{{ blog.blogId}}")'> {{ blog.blogId}} ...
1
vote
0answers
14 views

Environment specific Google Analytics token with AngularJS

I would like to have a certain config settings that would allow me to use different ga token per each environment (production, staging), I am using this library. It has occurred to me to declare an ...
0
votes
2answers
34 views

Failed to load resource error in Angular js

While try to run the following function in angular $scope.login = function (user, LoginForm) { $http.get('http://localhost/Angular/index.php/core/login').success(function (data) { ...
0
votes
0answers
25 views

angular-ui: ui-router dynamic routes and states

I have a dynamic route defined as: $urlRouterProvider .when( '/:resource?collection&type&id', [ '$match', '$stateParams', function routeValidator( ...
0
votes
1answer
25 views

Treeview like representation

Lets say using the following data I would like to create a treeview-like representation. var demoData = [ {"name": "person1", "parent": ""}, {"name": "person2", ...
0
votes
1answer
20 views

How to use HTTP.GET in AngularJS correctly? In specific, for an external API call?

I have the following code in the controller.js, var myApp = angular.module('myApp',[]); myApp.service('dataService', function($http) { delete $http.defaults.headers.common['X-Requested-With']; ...
0
votes
0answers
13 views

AngularJS: need to stop the slideshow and to re-enable the search

I cannot seem to be able to fully stop the slideshow and get the search working... I am not quite sure what I'm doing. Using setInterval() for slideshow and using AngularJS ng-model="query" to do the ...
0
votes
1answer
16 views

How to append values to DOM from dropdown generated by angular.js

The scenario is: 1.Load content from controller into <select>. 2.Append every selected item in the dropdown, to a <p> tag, such that it looks like a list . First part is done ...
0
votes
2answers
30 views

dynamically create two column checkbox list in angular

I have an application that is using angular.js and I'm very new to it. I have a list of checkboxes that gets dynamically created based on a previous selection. For example, if I have a dropdown of ...
2
votes
1answer
22 views

Angular JS: How to write controllers

I see in most examples that controllers are written this way, with an array as the second argument. And I guess the array has the dependencies listed out, then the anonymous function with the ...
0
votes
1answer
35 views

angularjs ng-repeat is not looping through the modal box

Hi everybody so I am building this assignment for a class, and I have reached a wall. The ng-repeat is not looping through the modal box. It loops through the first item but then stops. Any help? Here ...
0
votes
2answers
31 views

Clone elements in angularjs

I need to duplicate some input fields in order to handle data from clients. I have done it with jQuery http://jsfiddle.net/m7R3f/1/ HTML: <fieldset id="fields-list"> <div class="pure-g ...
0
votes
0answers
17 views

Route googlebot/ no javascript to different page using ruby on rails

I'm trying to make my site more SEO and JavaScript disabled friendly. Right now I'm using a lot of Angular with Ajax calls, which Google-bot can't parse. I know I can use libraries like phantom.js ...
0
votes
1answer
21 views

Textarea linebreaks not showing

I'm building a inbox chat app in angularjs. Users type in their message in a textarea and their messages gets saved into the db. They can press enter while writing in the textarea to create line ...
2
votes
2answers
44 views

supplying AngularJS controller data

Assuming a controller is there to manipulate some data on the scope, what is the best practice to supply the controller with that data? For example, if I have a list of items I might want a ...
0
votes
0answers
24 views

Angular Element no longer working to select elements by id [on hold]

I have been working in Angular 1.2.0-rc3 and Angular.element worked fine selecting elements by id, however in 1.2.3 which i just installed it does not??? Is this true or am i not understanding it ...
1
vote
1answer
17 views

Using angular services before manual bootstrap

I would like to use angular services before doing a manual bootstrap(the ng-app directive is not being used). Is there a way to access angular services without calling angular.bootstrap on an empty ...
0
votes
0answers
11 views

AngularJs Multipart $http Request Issue

For some reason I can't get [object Object] out of the form. I'm using hte method found here: http://badwing.com/multipart-form-data-ajax-uploads-with-angularjs/#comment-431 The JSON i'm sending is ...
0
votes
0answers
24 views

angular ng-model: changing the binding target dynamically

I have the following template: <label for="chk-bl-{{item.Id}}" ng-repeat="item in list"> <input type="{{inputType}}" id="chk-bl-{{apiController}}-{{item.Id}}" ...
1
vote
0answers
22 views

In AngularJS, how do you specify secondary sort?

The code below is adapted from the AngularJS tutorial step 4 (http://docs.angularjs.org/tutorial/step_04) I'm able to specify the secondary sort in the controller.js code using an Array. It works ...
2
votes
0answers
36 views

Angular: rendering a lot of DOM Elements faster

I work on a calendar application which is developed with Angular and I'm exposed to a rendering performance problem. I took a look to a lot of subjects about the rendering performance of the ngRepeat, ...
0
votes
0answers
23 views

Sending image/file via AJAX to PHP angularjs

Hello I am trying to send a file from an <input type="file"> via AJAX (angularjs) to a PHP function page. actually I get the file with js var setSmallFile = function (element){ smallFile ...
0
votes
2answers
40 views

Only show first element of ng-repeat

How do I show only the first element in angular? I'm using ng-repeat like this: <div ng-repeat="product in products" ng-show="$first"> <div>{{ product.price }}</div> ...
1
vote
1answer
29 views

Angular only pulling last JSON object

Trying to get all JSON objects in an array. It's only returning the last one. Here's a sample of my JSON: { "manufacturer":{ "name": "manufacturername", "cameras": [ ...

15 30 50 per page