Tagged Questions
0
votes
0answers
9 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
31 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
24 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
0answers
17 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
29 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
28 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">
...
4
votes
2answers
23 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
22 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
1answer
23 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
18 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
39 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
24 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
15 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
44 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
27 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
26 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
38 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
36 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
31 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
22 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
20 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) ...
0
votes
1answer
14 views
Fire AngularJS after loading an Express-routed Partial
i'm still new to AngularJS, and so i encountered a problem that is taking my sleep away ;)...
We have built an app based on node.js and express. The whole routing of the partials is done via Express.
...
1
vote
0answers
16 views
Angular and youtube iframe issue
I'm trying to add a youtube video to my app, but angular removes the iframe code and does not appear, I'm using this
<div class="content-read" ng-bind-html="data.content"> </ div>
try ...
1
vote
2answers
91 views
Using “this” in AngularJS
I am new to AngularJS.
I have a select box that when clicked populates a second one. Probelem is that instead of doing it for the one item I wanted it to - it's updating the select boxes in all rows. ...
2
votes
1answer
32 views
Submitting an Array of Checkbox Values with AngularJS & Laravel 4. Checkboxes not Checking (Visually)
Update
After experimenting more with the solution(s) from: How can AngularJS bind to list of checkbox values? I am a bit closer. This is what I've updated my <input type="checkbox"> to:
...
0
votes
0answers
24 views
html5 websocket send() function not working
I have browser js code that connects to Java @ServerEndpoint code (JSR-356). The connection is successfully opened (I checked this in debug mode both in Java and checked in Console in Chrome Developer ...
0
votes
0answers
27 views
Converting multidimensional object array to JSON
I have an array of object which i want to convert to a JSON string but i recieve the following error: JavaScript exception :Uncaught TypeError: Converting circular structure to JSON
From what i ...
0
votes
3answers
23 views
Angular JS - Number filter - Change colour when negative
I am applying a number filter to the result of a function:
<tr class="text-center">
<th class="text-center">{{monthCategoryTotalPredict = getCategoryMonthTotal(costDirection, month, ...
0
votes
2answers
30 views
AngularJS Form two way binding
I'm new to angularJS
i'm try to create a registration form using angularJS
but when i press submit it doesn't work.
The ng-disable attribute is working
HTML
<div class="col-xs-8 col-sm-8 ...
1
vote
0answers
21 views
Advanced Numeric Control for jQuery or Angular?
I've been on the looking for a jQuery or AngularJS numeric control that does things like:
Decimal formatting
Currency Formatting
Thousands formatting
along with the basic features in the HTML5 ...
0
votes
0answers
17 views
AngularJS: using a directive in Google maps infoWindow
I'm using Google Maps for AngularJS (http://nlaplante.github.io/angular-google-maps/),
and I want to include a directive in the infoWindow for a marker (this directive points to a templateUrl).
What ...
0
votes
1answer
31 views
AngularJS increment day in date format
What I'm doing is a small prototype application that interact with input date type format.
<label>From:<input type="date" ng-model="window.from">
What I did now is that if I change the ...
0
votes
1answer
13 views
AngularJS <select> not saving value in object?
I have this select element in a row (of which there can be a few) which represents an item. But the scope for manufacturer does not update when this is selected. The default for the item's ...
0
votes
1answer
25 views
Why doesn't the default Yeoman app module need an empty array for dependencies injection?
I know this feels like a silly question but it really bothers me. I've learned when declaring a module in angular, that one must put an empty array, regardless of there being a dependency needed.
...
0
votes
0answers
40 views
angular next previous item
How to add next previous buttons with description
for example
<a class="previous" ng-click="{{prevItem.title}}">{{prevItem.title}}</a>
<a class="next" ...
3
votes
2answers
52 views
Managing an AngularJS web app within ASP.NET (alternative to RequireJS)
I'm currently using a combination of RequireJS and AngularJS in my application and on the server side is ASP.NET.
I chose to use RequireJS for a few of reasons:
I started the project with it before ...
0
votes
1answer
37 views
How to create generic Service for Rest API Call using $http?
I want generic service which i'll call from my controller. I want options to be passed dynamically.
For Example.
var app = angular.module('common', []);
app.factroy('APIService', ['$http', ...
0
votes
1answer
27 views
How do you trigger rendering template when data is arrive though resolve in Angularjs
I can call for first time load in controller like this
function RankCtrl($scope, $route, $routeParams, Rank) {
$scope.leagues = Rank.query($routeParams)
}
When route changes, I am using resolve ...
0
votes
1answer
30 views
Unit testing an AngularJS directive that contains $watch() not being compiled
I'm currently researching my problem but I thought adding a question here may help as I'm new to AngularJS and even newer to Unit Testing.
I have the current directive that works, it users the ...
0
votes
1answer
31 views
Blocked frame error when signing in with gplus implemented with angularjs
I am implementing googleplus signin using angularjs, and occasionally when i try to signin, i get a message in the browser console saying;
Error: Blocked a frame with origin "http://localhost:8080" ...
0
votes
1answer
21 views
AngularJS share copied object across controllers
In my AngularJS project, I am not able to share data of copied objects across different controllers.
I am able to share data properly if I set the properties in code but if I copy the object then it ...
0
votes
2answers
38 views
Angular js seperation to different modules in different js files [on hold]
I created an angular web application that enables drag and drop elements.
I finish building it, but i have one big module. The module is placed in one js file with thousand of code lines.
I would ...
1
vote
1answer
37 views
how to catch angular ng-include error
As title,
when I use the ng-include,how to catch the error when the addr is not exist?
I have finish a ng-include router inside a ng-view(with ng-route),
It's a little bit like this:
ContentCtrl:
...
0
votes
2answers
21 views
Avoiding Dupes when pushing values from form to array in AngularJS
I'm having problems avoiding dupes with my code. Here is a simplified example. I know the problem is in the array object being a reference of the same scope variable, but what is the best way to ...
0
votes
1answer
24 views
Angular JS reduce calls to digest
I have an array of elements that I pass from parent controller to child controller through the $scope. I want to add some properties to these elements, such as an instance of MomentJS object so I ...
1
vote
0answers
24 views
Self-closing Textarea
Related to this AngularJS on IE10+ ,textarea with placeholder cause "Invalid argument." and this AngularJS 1.1.5, Internet Explorer and ng-show with objects (Bug) we have to use the textarea ...
1
vote
1answer
40 views
Service with promise and $watchCollection not updating the values
I'm trying to build real time service messaging with MongoDB and AngularJS. For some reason, when there is new data in my 'messaging' collection, the Messaging.getAllMessages() service is not ...
1
vote
2answers
84 views
$index of Object in Array while using ng-repeat and a filter
Im fairly new to angular and have been able to get around somewhat. But I cant seem to find the answer to this scenario...
I have an array of objects, which I am pulling down from firebase. I am ...
1781
votes
8answers
181k views
How do I “think in AngularJS” if I have a jQuery background?
How do I “think in AngularJS” if I have a jQuery background?
Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the ...