Tagged Questions
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.
0
votes
0answers
5 views
Dynamically change name of ng-model in html tag
I want to change my ng-model name (in the html input tag) for each input tag dynamically. For example if my json file looks like:
[{cows: 0, pigs: 14, roosters: 2, horses: 23, goats: 21}]
and I am ...
0
votes
0answers
6 views
Angular $q.defer breaking after moving to 1.2
I have this Angular snippet which was working fine under Angular 1.0.8. I just switched to 1.2 and now, although I don't see any errors, I get no objects in the html.
// --- CONCERNS FACTORY --- //
...
0
votes
1answer
14 views
AngularJs: How to detect which option caused the change event?
I have a multiple select control and I want to be able to prevent the selection of multiple items within a group. Here's the code:
<select multiple="multiple"
data-ng-model="dlgData.selItem"
...
0
votes
2answers
18 views
Can't seem to render HTML in my AngularJS app
Forgive a total AngularJS newbie.
I'm having trouble rendering HTML content in my Angular app!
Given the following partial:
<div ng-app="myGreatApp" ng-repeat="article in articles" >
...
0
votes
1answer
9 views
using datepicker on selecting date value not binding to model Angular js
i am using datepicker but here facing problem regarding model value not binding to model when i select date its nothing happen, any one can tell me where i am doing wrong must be appreciated. here i ...
0
votes
1answer
10 views
AngularJS - Trouble with directive changing value in controller
I'm getting large images from an API in my main controller.
I have a directive that successfully lets me know when each image is loaded:
app.directive('imageonload', function() {
return {
...
1
vote
0answers
15 views
Is it a good practice to have fat $routeProviders and thin controllers?
Generally in MVC, you would have really fat models and thin controllers for easier testing. Since Angular does not really have a true concept of models, it's hard to just dump all the code somewhere ...
0
votes
1answer
12 views
Using AngularJS $filter with ng-disabled
I've got an object in my $scope that contains a bunch of details about, say, an election. This object includes a voters array of objects, each with an _id:
$scope.election = {
voters: [
{ _id: ...
0
votes
2answers
18 views
Angular Editable Field Reverting to Original Name After Change
I am trying to remotely get a user's name and then have it editable so that it can be saved again. I am getting the name correctly, but when I try to change it, it reverts back to the old name.
Am I ...
0
votes
2answers
18 views
Angular Http Get Always Returns Status 0 for ng-click
I've been trying to get this to work, conceptually its simple click the tag and it calls a REST service that returns a JSON result, where i grab the country name and show it just as a test.
I'm using ...
0
votes
0answers
7 views
How to have a checkbox in an ng-grid grouping
Is it possible to have a check box in an ng-grid grouping header?
When that grouping check box is clicked, all the checkboxes of the rows under that particular group should be selected.
The other ...
0
votes
1answer
12 views
Angular directive failing silently (directive rendered too soon?)
I have an Angular app with a custom element directive (<uber-table>). <uber-table> is supposed to take a collection of objects, render them into a <table> and add some functionality ...
1
vote
1answer
17 views
can value() or constant() be used inside each other in AngularJS?
I have a .constant() defined that acts as the base URL for a service to access. I then have several constants with relative URL paths that I'd like to prepend the base URL on to make them absolute.
...
0
votes
0answers
7 views
angularjs and spring mvc - upload multiple files in one request
I want to implement file uploading in my web application, I am using angular.js on client side and spring mvc on server side.
I managed to get single file upload and multiple file upload working by ...
0
votes
0answers
15 views
AngularJS select transcluded elementes in directive controller
Making a custom select element with divs and UL's, I will describe the problem after the code:
directives.js
directive('selectMe', function() {
return {
restrict: 'E',
...
1
vote
0answers
32 views
AngularJS: Error while interpolating: {{ $index + 1 }}
I used $index inside simple ng-repeat to show items' number:
<li ng-repeat="item in dataList | limitTo:5">
<span>{{ $index + 1 }} </span>
</li>
And it worked OK for ...
0
votes
0answers
14 views
angular, setting dynamic tabindex with a custom directive
This is embarassing.
I can't figure out how to do something appearingly trivial.
tr.row(ng-repeat="user in users")
td
div(input-inline-edit="user.name" tabindex="{{ $index*10 + 1 }}")
td
...
1
vote
1answer
23 views
how does $scope in controllers work and different ways of declaring controllers?
I am looking at some samples of how controllers work in angular and I see two ways of declaring them, one with just controller name and one with "as somename". Examples that use ng-controller = ...
0
votes
0answers
27 views
AngularJS: Render HTML output to a string
I am writing an app that must generate a PDF file based on the HTML generated by AngularJS. I do not want to display this output to the user. I want to capture the rendered HTML to a string and send ...
1
vote
1answer
19 views
Errors with Angular.Dart tutorials
Installed Google Dart 1.0. Basically a Dart noob at this point...
angular.dart tutorial apps at - https://github.com/angular/angular.dart.tutorial
Seems broken or I am doing something wrong.
in ...
0
votes
1answer
26 views
AngularJS - {{$index}} within onclick
I'm attempting to compile {{$index}} from a ng-repeat inside an onclick. Setup looks like this.
<div ng-repeat="stuff in things" >
<a href="#" ...
0
votes
1answer
12 views
Protractor getText of WebElement in repeater array
In an html page I have:
<ul class="phones">
<li ng-repeat="phone in phones | filter:query | orderBy: orderProp">
{{phone.name}} - {{phone.age}}
...
0
votes
0answers
16 views
angularjs directive accessing original nested elements
Pretty basic scenario, just not sure how to approach it
I have an angular app, I have an element restricted directive that uses a templateUrl to bring in a partial.
The partial works fine and looks ...
1
vote
2answers
34 views
Dynamic tag with angularjs directive
I would like to create an element directive in angularjs that produces an html element from a json blob passed as an attribute. I have tried quite a few variations of the following...
...
1
vote
0answers
26 views
AngularJS RequireJS Browserify and the Javascript module/global scope nightmare
I have been digging a bit lately in all this CommonJS vs AMD battle and this is my findings...
( BTW I am not preaching here I am sharing my thoughts to get some constructive insights... )
The ...
0
votes
1answer
11 views
Angularjs Extended Directive Controller
I'm trying to extend a directive by passing controllers. I'm able to grab the parent directive's controller through require , but I also want to define a controller on the extended controller.
...
0
votes
1answer
29 views
Do i need a JSframework? [on hold]
I want to add some JS funtionality to our site. (wishlist, inquiry, ect) I think it would be nice for the UX that it is going to be build with some JS code
Do i need a JSframework like Angular, ember ...
0
votes
1answer
23 views
Angular - update controller data from another controller
I'm just starting to use AngularJS.
I have a simple CRUD app which communicates to REST api. I have two controllers which control my Projects data and Tasks data respectfully. On the backend Tasks ...
0
votes
1answer
22 views
Display an array in angularjs
I have an API on my nodejs server which will return an array.
[
"123_ayesha098",
"3ar7hkung",
"aali",
"Abdelhak",
"adityaputra",
"adraga",
"agnusdark",
"ahkeno",
"ahmedjubayer",
...
-1
votes
2answers
17 views
Bower with Bootstrap 3
Trying out Yeoman (1.0.4). Generated an Angular app with yo angular; entered No to installing Bootstrap with Sass, as I wanted Bootstrap v 3 with LESS.
After scaffolding, to get Bootstrap 3, I ...
1
vote
0answers
7 views
Angular Mouse Directives on Touch Devices
I have a simple web game working in HTML5 and CSS with Angular. It's using Angular's ng-mousedown, ng-mousemove, and ng-mouseup directives to let the user highlight letters and tiles in the game and ...
0
votes
1answer
18 views
Animate the appending of HTML to an element in Angular
I have a directive that appends a chuck of html to an element in the DOM after the user clicks a button. What's the best way to animate this chuck of HTML as it gets rendered?
The enter and leave ...
0
votes
0answers
5 views
Angular ui-router onEnter function not firing
Thanks to some great help from the SO community, I have a working angular SPA that uses multiple states/views using the ui-router library. However I am getting a behavior that seems at odds with the ...
0
votes
1answer
25 views
Angularjs being prominent over jquery and jquey code not working
I am using angular js ng-show ,ng-hide for a control and also am using show(), hide() in javascript at different situations.But only the ng-show and ng-hide is working and not allwing Jquery show() ...
0
votes
0answers
20 views
Persisting Data Using AngularJS in a Rails app
I'm building a multiple choice trivia game with Ruby 1.9.3, Rails 3.2 and AngularJS 1.2.0. Rather than have the question page refresh to save the users answer and track the questions asked, I thought ...
0
votes
1answer
21 views
Displaying an Image after uploading in Angular JS?
I have a question. So I found that you can upload an image in HTML and I used the following code:
<form name="imageUpload" method="post">
<input type="file" multiple accept = image/* ...
1
vote
1answer
17 views
What is the use of @ in Angular $resource
This is from the documentation.
var User = $resource('/user/:userId', {userId:'@id'});
var user = User.get({userId:123}, function() {
user.abc = true;
user.$save();
});
What does @id mean? If ...
0
votes
0answers
17 views
AngularJS Module Injection
I'm using Angular in combination with RequireJS. I've defined very concise controllers that encapsulate logic specific to those modules. One draw back I've had is I have to include all angular ...
0
votes
0answers
58 views
Which Javascript framework to learn in 2014? [on hold]
There is a similar question made in 2011 (Which JavaScript framework (jQuery vs Dojo vs ... )?). I went over and over to check for a more UPDATED answer but could not find one.
Just learned ...
0
votes
1answer
15 views
Nested Partials and Object References in AngularJS
I have a partial view that looks like:
<div ng-if="activeItem.typeOf == 'text'">
<div onload="item=activeItem" ng-include="'views/app-builder/text.html'"></div>
</div>
...
1
vote
0answers
7 views
Angular JS - Getting [$resource:badcfg] error when unit testing $resource.get but is fine on controller
Here's how I setup my Article resource:
define(['services/index', 'services/Helpers'], function(services) {
'use strict';
services.factory('Article', ['$http', '$resource', 'AppConfig',
...
0
votes
1answer
32 views
Angularjs - simple form submit
I am going through learning curve with AngularJs and I am finding that there are virtually no examples that serve real world use.
I am trying to get a clear understanding of how to submit a form with ...
0
votes
1answer
17 views
How do get information from a populated dropdownlist before calling a method to fill the details grid?
What is the proper way to do this ? Here are the statements one after another but since javascript is async I am guessing $score.lastItem does not exist when the 2nd function is called? So Do I put ...
0
votes
1answer
11 views
CSS offset increments with AngularJS
In my Angular app I have a div whose left offset I'd like to increase by 90px every time the slideThis() function gets called. In jQuery I'd do this by specifying something like left: '+=90', however ...
0
votes
1answer
11 views
Can angular's ngTouch library be used to detect a long click (touch/hold/release in place) event?
My AngularJS app needs to be able to detect both the start and stop of a touch event (without swiping). For example, I need to execute some logic when the touch begins (user presses down their finger ...
0
votes
1answer
8 views
Angular JS - Loading modules from different files
I'm using a few modules from http://mgcrea.github.io/angular-strap/ and a tree view: http://ngmodules.org/modules/angular.treeview and I'm having problems when loading them. For example, I've splitted ...
0
votes
0answers
21 views
The best deployment architecture for angularjs nodejs app
I have Moto Adverts application in angularjs and nodejs.
Angularjs-client-side is running on Apache HTTP Server (localhost:8000) but nodejs-server-side is runnning as node.js http server ...
0
votes
0answers
14 views
Angularjs not minified reference errors
I am including "not" minified libraries like this:
<script type="text/javascript" src="lib/js/angularjs/angular.js"></script>
<script type="text/javascript" ...
0
votes
2answers
15 views
AngularJS - How to propagate event to a nested template?
I'm trying to build a website which has the following flow.
Index.html -> content.html(partial rendered by ng-view) -> wizard.html (sub-view nested inside content and rendered by using 'ng-include').
...
0
votes
1answer
14 views
Rest, ngresource, $resource not returning anything
I'm trying to GET Rest data from a parse.com backend with Angularjs. I expect at least console log you can see in the code below to return something, but it returns nothing, and there are no error in ...