1
vote
0answers
5 views

Breeze navigation properties

I have just started working with Breeze (using Angular) and have managed to get some data from my Odata service and displayed it on the page. However, I now need to get a related field via a foreign ...
0
votes
0answers
11 views

Angular js - slide views but not home page - ng-animate

i'm using ng-animate to slide the app views, so each route slides own view , this is my simple code: html: <div ng-view ng-animate class="slide"></div> css: /*Animations*/ .slide{ ...
0
votes
2answers
25 views

Cannot obtain proper data in angular JS

I have done the following in AngularJS. The data is obtained from the URL mentioned. If you open the URL, you can see the response it provides. However, I am not able to obtain the title inside HTML ...
0
votes
1answer
20 views

angularjs get generated html

I would to get generated html in angular js for example my html is like <a class="navbar-brand" href=""> <img data-ng-class="headerTemplate.brand" ...
0
votes
1answer
37 views

AngularJS - Change controller by condition?

I have a simple form with data which summarize the pressed items ( via addition) (JSBIN) (700=300+400) The form is bounded with ng-controller="OrderFormController" Which inturn has this method ...
0
votes
0answers
16 views

javascript: malformed utf-8 data exception while decrypting

I am new to javascript.I am trying to decrypt encrypted data in javascript but i am getting "malformed utf-8 character" as exception error sometimes but not very often. Below is the code which I am ...
0
votes
1answer
21 views

How to trigger a function from ng-view's controller on load — angular

The goal of this question is to have an active class, that is set on the current view's navigation anchor. The trigger for this active class is a function that executes on the view's load and not the ...
0
votes
0answers
20 views

Recursive tree printing in Angular JS

I have already seen, read and implemented lots on answers on how to achieve recursive tree printing in Angular JS. I think the 2 best approaches are - ...
1
vote
1answer
28 views

How do I send form data to server using angular?

Currently, I am using a server side framework CakePHP to build my app. I need to integrate angular into my app. Currently, I send the following inputs User.old_password, User.new_password, ...
0
votes
0answers
10 views

How to delete/remove a scaffolded route generated in Yeoman Angular

I know I could just delete the code and files; however, is there a way to remove a generated route in yeoman - angular in a similar automated command? e.g. yo angular:route myroute is how you ...
0
votes
1answer
18 views

Angularjs form reset

I have a reset function in angular to clear all the fields in a form. If I do something like: <a href="#" ng-click="resetForm()">reset</a> $scope.resetForm = function() { ...
0
votes
2answers
25 views

How to keep focus in same text field in Angular

I'm new to Angular, and I'm writing an app using Angular, in which user would enter several codes to be sent to the server. User will enter the code and press 'Enter' or 'Tab' to send it to server. I ...
0
votes
1answer
22 views

Set and Display current Data on ng-click?

I'm using Yeoman - angular generator. JSBin: JSBin Link I have a simple list of airports being set from a factory angApp.factory("Airports", function() {}); and displayed from ng-repeat <ul ...
2
votes
0answers
33 views

AngularJS directive: put a call function in an attribute, without including another attribute

What I'm after I would like to create a ngLoad directive for images on my webpage. This is my preferred markup: <img ng-src="{{ src }}" ng-load="onLoad()"> What I have JSFiddle Right now, ...
0
votes
1answer
32 views

AngularJS: count selected items on change

I have a form with some custom controls. At the bottom of this form, I need to display "numSelected of numRequired". I know "numRequired", but how can I figure "numSelected"? The form looks ...
2
votes
2answers
44 views

Did I share state correctly outside angular directive? (parent scope / $rootScope issue)

I have two elements on my page which are not nested in some way. With attributes on the first one, I would like to set the content of the second one, like so: <body> <input info="This is ...
0
votes
1answer
33 views

Angular.js scope variable undefined, ng-repeat initial state

Hi i've recently started playing with angular & node, and immediately i've ran into issues. I have a simple Controller, which is used to fetch single object. All works fine, but i would like to ...
0
votes
1answer
31 views

Preload image in browser for display after server disconnection

I am using AngularJS along with HTML5 Server-Side Events (SSE) to continuously update the display of some data in a web page. As part of this, I have an icon to display the state of the connection to ...
0
votes
3answers
39 views

Globally available variables with Angular

We are in the process of migrating our webapp to Angular.js. Traditionally, we created a global object named app and used it to store functions, variables, etc. that were used globally. For example, ...
0
votes
4answers
30 views

Change bootstrap progress-bar width from angularjs

I'm new in Angularjs and I am trying to update the width of a progress bar when a value in my controller change. I have something like: <span id="percentage">$ {{getTotal()}} ...
5
votes
3answers
87 views

Angularjs $http VS jquery $.ajax

Can I set context in Angularjs $http just like we can do it in jQuery's $.ajax? define([ 'app' ], function(app) { app.controller("controller1", function($scope, $route, $http) { ...
0
votes
2answers
31 views

Angular Directive with watch in link

I'm writing an angular directive that has a function called init() that needs to run when the page loads, and any time two variables change. I started out with this: link: function(scope, elem, ...
0
votes
5answers
28 views

Set default value in select when the ng-model is null

I'm new to angular and i'm trying to set a default state to select when my ng-model is null. Basically I want to set it to 'None' if the model is empty. I tried the below code but it's not working. ...
0
votes
1answer
33 views

AngularFire 0.5.0 $on 'change' event not firing correctly

Let's say I have a collection of articles I am trying to paginate through. I'm using the $on("change") event to listen for changes to index and limit .controller('articlesCtrl', ["$scope", ...
0
votes
1answer
17 views

No auto-decompression of gzipped json on browser's side when using angular's http get method

I'm trying to load a json file using angular (v1.2.6): $http.get('myfile.json').success(function(data) { ... } This works fine, except when I create a (static) compressed version of the file on the ...
0
votes
2answers
41 views

Angular JS is HTML for applications meaning [on hold]

I'm going to start a project soon which will make heavy use of AJAX and JavaScript. Having never dealt with MVC before I think this is a perfect time for some out with the old and in with the new and ...
0
votes
4answers
41 views

how to use ng-repeat with filter and $index?

i want to use ng-repeat in Angular, while i only want to output some elements of the array. something like: ng-repeat"item in items | filter:($index%3 == 0)" but absolutely it cannot work. please ...
0
votes
1answer
32 views

Match tab with correct content

I have a snippet editor Image that loads in some snippet via a $templateCache. Now the problem I am facing is that when you click on any of the snippets they are loaded in all three tabs. And the ...
0
votes
2answers
39 views

Angular Directive refresh on parameter change

I have an angular directive which is initialized like so: <conversation style="height:300px" type="convo" type-id="{{some_prop}}"></conversation> I'd like it to be smart enough to ...
0
votes
2answers
30 views

Angular Controller Arguments

Here is a angular code from this page: http://docs.angularjs.org/guide/controller 1 var myApp = angular.module('myApp',[]); 2 3 myApp.controller('GreetingCtrl', ['$scope', function($scope) { 4 ...
1
vote
1answer
25 views

AngularJS Tests fail when adding new deps to the module

So, all tests pass without the 'truncate' module, although the app breaks when I am just serving it with grunt serve without the 'truncate' module. So tests fail with it, and app breaks without it. ...
0
votes
1answer
32 views

How do I count selected checkboxes in Angular?

I need to count the number of items I have selected in a list. I have the following list: <ul> <li ng-repeat="items in item"> <input type="checkbox" name="item_id[]" /> ...
1
vote
1answer
32 views

$watch in Angular js-model cannot be accessed in controller

I have tried using $watch to get the data entered in the <input type="text" ng-show="expense.done" ng-model="spentamount" size="30" placeholder="Enter the amount"> ...
2
votes
1answer
47 views

Angular adding a random number to requests for .js files which I do not want

Excuse me if its a trivial thing... I haven't been able to get around this problem. I would like all my Js files to be cached (I have set the maxAge as one day, as you can see in the code snippet ...
4
votes
2answers
30 views

Angular JS issue with string.length in templates

I have an issue with AngularJS (version 1.2.6). For some reason that I could not understand I cannot access the length property of a string variable stored in the $scope. In the template: String ...
1
vote
0answers
23 views

how to create mock for Date method within controller in angularjs

$scope.deleteAbc = -> alert("xyz") how do I get the value of the alert when this method is call from test. describe "XYZ", -> $scope = null $controller = null beforeEach inject ...
0
votes
2answers
36 views

Better ways to stop all future calls when there is no internet Connectivity

I want to stop all the future ajax calls when there is no internet connectivity. I know the $rootScope.isOnline = navigator.onLine; line to check either user is online/offline. Is there anything I ...
0
votes
1answer
23 views

AngularJS : Cross Domain Issue

I have a Java web application called myApp running on localhost:8080/myApp I created one AngularJS application using Yeoman, Grunt and bower. In my angularJS application I have one HTML page to ...
2
votes
2answers
42 views

Iterate over multiple array elements

I want to iterate over multiple array elements named urls and names. Below is the code where only urls are iterated. How can I use names also with urls? JS var app = angular.module('plunker',[]); ...
0
votes
1answer
25 views

When can I enable JQueryUI drag-and-drop in my AngularJS app?

I have an AngularJS app that's a table of users. It's generated with this code: <tr class="userRow" ng-repeat="user in users | orderBy:'last_name'"> <td><div ...
0
votes
1answer
17 views

How to access the Schema.ObjectId to get the objects json on the client using the mean stack?

My Schema looks like: super.js: var superSchema = new Schema({ title: { type: String, default: '', trim: true }, item: [{ type: Schema.ObjectId, ref: 'Item' }] }); ...
0
votes
2answers
46 views

Cannot get model value in Controller method in Angular js

I am developing an app in Angular js javascript: $scope.spentAmount = function() { angular.forEach($scope.expenses, function(expense) { if(expense.done){ ...
0
votes
1answer
33 views

AngularJS ng-mouseover & compiling templates

I'm trying to implement qTip with angular. I have a ng-repeat and want to display a qTip on mouseover of a specific HTML element for every item in my collection: <div id="{{feedItem.id}}" ...
0
votes
1answer
28 views

Angular reusable class (not the CSS kind)

Is there a way to have controllers extend some base controller class? Maybe it's obvious but I'm new to Angular and just haven't found it with searches nor in the Angular docs. Maybe that's just not ...
1
vote
2answers
41 views

ngPattern binding not working

I want to validate an input using ngPattern based off of the selection of a select. It works after the first selection, but any subsequent selection does't bind correctly. Here's a jsFiddle for ...
0
votes
1answer
23 views

Is it possible to set a wildcard for $httpBackend responses?

Suppose I have the following test code in AngularJS: var someURL; var dummyJSON; $httpBackend.whenGET(someURL).respond(dummyJSON); Is there a way of making this the response for a set of URLs ...
0
votes
3answers
48 views

AngularJS confirm before route change

Is it possible to listen for route changes AND onwindowunload both to confirm page leave without saving changes? Use cases: User clicks Back User presses back button in browser User types in a ...
0
votes
0answers
34 views

Trying to update factory in one controller, and have another controller notice that it has been updated?

I have a page where one controller shows all of the logged in user's teams, and another controller allows the user to update a team. When the user updates the team name, I want the controller that ...
1
vote
1answer
24 views

AngularJs Call a function when 2 different https requests are done

Suppose i have 2 http requests, that i want both to be called asynchronously but i want both of them be finished before i'm rendering my view, how can i condition 2 separate calls to be done in order ...
1
vote
0answers
23 views

AngularJS Routes with Rails

I'm trying to use angularjs routing within a Rails application but I'm having some difficulty. I've split up my page into partials (called _events.html.erb, _categories.html.erb, and _times.html.erb) ...

15 30 50 per page