Tagged Questions
1
vote
2answers
17 views
How to handle async code that calls another async code [AngularJs]
I have factory that's using indexedDB and method getRecipe that needs this indexed db to receive data.
Problem is that indexedDB returns it's instance in asynchronous call and getRecipe is another ...
0
votes
0answers
9 views
Include Javascript module (AngularJs) in WAR
I am trying to separate my front-end and back-end parts into 2 modules.
Parent
| pom.xml
|
|--Back-end
|- pom.xml
|--Front-end
| |- pom.xml
My back-end module produces a WAR. I would ...
0
votes
1answer
17 views
Format input value in Angularjs
I'm trying to write a directive that automatically formats a number in the <input> but the the model isn't formatted.
Getting it to work is fine, on load the value in the input is displayed as ...
2
votes
0answers
46 views
Is this a memory leak of angular?
At http://docs.angularjs.org, click back and forth between pages the DOM Node Count continues to go up and up. No dramtical drop when I click "collect garbage".
0
votes
1answer
24 views
AngularJS - Passing object into ng-include (dynamically)
Below i have a working example... but with one problem... node.title inside the html works fine... but when {{node.title}} into the ng-include file... doesn't work. Only global $scope is visible and ...
0
votes
1answer
24 views
The trouble with $scope
I have an input file element within an angular view/form. I'm using ng-upload like this:
<input id="img" type="file" name="image" onchange="angular.element(this).scope().setFile(this)">
...
1
vote
2answers
34 views
Iterating over JSON returned by a Service on angular
I am trying to iterate over and search by id and return the other values corresponding to the id from a JSON object of the type shown below, by $resource in the controller. I am not understanding ...
0
votes
2answers
21 views
AngularJS, Second Controller not Working
I just started using AngularJS. I added a view/controller and route and its all working fine. But as soon as I start adding another route with a different controller things are not working. Following ...
2
votes
1answer
23 views
autoscroll angularjs doesn't seem to work
Hi I'm building a chatapp in angularjs and I want the chatbox to scroll down automatically. I'm using this example that I put in a directive: http://jsfiddle.net/atRkJ/
It works as it is but when I ...
-1
votes
0answers
16 views
AngularJS PHP Escape Values Passed Using ng-init
In my AngularJS app, I have a noJS value back that passes values into the controller using ng-init.
Example:
<input type="text" name="first_name" value="<?= $first_name; ?>" ...
1
vote
0answers
30 views
Why this Angular script is unable to retrieve JSON generated by Laravel 4?
AngularJS
$http({
method: 'GET',
url: '//www.ign-design.net/users'
}).success(function (data, status, headers, config) {
$scope.user.username = data.name;
...
0
votes
1answer
24 views
Angular JS ng-options returns “? object:005 ?”
I have searched everywhere and it is hard to tell what i'm doing wrong. I'm trying to populate a select component with values from a controller
My snippet from my controller
$scope.sTypes=
[
...
2
votes
1answer
37 views
How to access to the controller scope from a directive inside ng-repeat?
I'm a new user of AngularJS and I'm getting stuck when I have to access to a variable in a controller from a directive inside a ng-repeat. I think it has to be something related to scopes.
Here's my ...
1
vote
1answer
27 views
Angularjs Jasmine Test: Making api call with $backend
I have run into an issue, that after at least 8 hours of searching and tinkering and coming up empty handed requires some help from the community. There are articles that attempt to address similar ...
0
votes
1answer
30 views
AngularJS - Append html with ng-include
$scope.selectNode = function(node){
$(".withOptions").append('<li id="list_7"><div><i class="icon20 i-folder-open"></i> '+node.title+' <i class="icon16 ...
1
vote
2answers
55 views
Understanding using AngularJS promises, how would they help solve this issue
I am trying to load a JSON object from a server using $resource in the main controller of an Angular app. There are some routes that load a partial into ng-view where the data is displayed, paginated, ...
0
votes
1answer
51 views
How to start programming something like mohiomap? [on hold]
I'm thinking about creating a mindmap webapp for my own purpouses.
I would like to incorporate a layout like they do at https://www.moh.io/mohiomap/welcome.php.
Can anybody give me any hints on how ...
1
vote
2answers
34 views
Angular Checking What Filters Return
I have a list with ng-repeat and a filter , the filter filters based on an html input . If the filter produces an empty list , I want to show the user some informative message . I can't figure out ...
0
votes
1answer
23 views
Internal Server error on post Request Using Made Custom Services in Angular js
i am new one for angular so i tried my best to solve this but after too much struggle i can't that's why asking. actually, i am not getting response back using $http i don't why because according to ...
0
votes
1answer
12 views
Angular orderBy Date
I have an array which I want to order by date in Angular.js:
<tr ng-repeat="er in vm.readerFeeds | orderBy:'-publishedDate'">
<td>{{er.publishedDate}}</td>
</tr>
The ...
0
votes
3answers
36 views
Angular loading img src in repeater without items
I have an angular repeater (table) which includes a src element. However, my URL gets called the first time before the items are loaded, causing one 404 load like this:
...
0
votes
1answer
16 views
angular ng-animate causing weird animation on model changed
i am currently using angular 1.2 rc3, i used transition for my ng-repeat items.
however, i found that whenever i change my model for the ng-repeat, the transition goes haywired. You'll see the whole ...
0
votes
2answers
19 views
Building Dynamic Template URL in AngularJS config
I'm currently working on an ASP.NET MVC site. Wherein there are different tenant users.
so if a user wants to view his tenant page he has his own unique slug name.
eg: www.xxxxx.com/(slugname)
Now ...
1
vote
1answer
27 views
Issue in angular js routeProvider
I have a problem in angular js routeProvider. If i am clicking register or login link then its not going to the next page just shows url like this. http://localhost:3000/#/register or ...
0
votes
0answers
41 views
Update View AngularJS
I'm really having some trouble figuring out how to update the view in AngularJS - just started learning it a few weeks ago, so please go easy. Here's what I'm trying to do: I have a grid of photos ...
0
votes
1answer
32 views
AngularJS Service Isn't Returning Data
I have to AngularJS services to load data to my app which are set up in essentially the same way, although one works and one does not.
angular.module('myApp', ['myApp.filters', 'myApp.services', ...
0
votes
1answer
24 views
Angularjs Directive - Isolated scope value is undefined
I am a newbie in angularjs. I am little confused about isolated scope in directives. I have the following code,
HTML
<!doctype html>
<html ng-app="myApp">
<body ...
1
vote
1answer
20 views
in angularjs, how do you get a `select` to refresh when the array for ng-options changes?
have an select based on any array. the elements in the array may change. how do I get the angular controller to refresh the array?
module.js
var langMod = angular.module('langMod', []);
...
0
votes
0answers
16 views
Autoscroll down angularjs
Hi I'm creating a chat app with angularjs that autoscrolls down when a user messages another user. I'm not sure how to implement this as my chat window is a fixed ul element. I'm thinking I will ...
0
votes
4answers
56 views
Oracle ADF vs a Javascript MVC framework like EmberJs or AngularJs
I am starting a new project that has planned to use a large of Oracle components BEPL, SOA Suit, Oracle Spatial and Oracle ADF. I am trying to convince the team that a Javascript framework like ...
1
vote
1answer
39 views
Protractor times out waiting for sync with page when using $resource
I'm testing Protractor with a small AngularJS app.
This is the test:
describe('Testing Protractor', function() {
var draftList;
it('should count the number of drafts', function() {
...
1
vote
2answers
105 views
AngularJS: $resource custom methods not being called
I have a resource defined for which I have defined a custom method.
In my template, I am not able to hit this method.
My code looks like this. The getName() function is not being called. What am I ...
11
votes
3answers
1k views
What application structure to use with AngularJS and Laravel?
I recently started to build a large social network, and and I thought my structure was good but it turned out I built this logic up badly.
I mixed my views with AngularJS (bad idea), skipped blade ...
30
votes
1answer
6k views
AngularJS 1.2 $injector:modulerr
When using angular 1.2 instead of 1.07 the following piece of code is not valid anymore, why?
'use strict';
var app = angular.module('myapp', []);
app.config(['$routeProvider', '$locationProvider',
...
5
votes
1answer
200 views
Firefox select dropdown keeps refreshing/reverting to default option due to running Javascript - AngularJS
I'm building an app in AngularJS and am having trouble with select dropdown menus when using Firefox.
When I click a select menu and hover over the options, it resets the selected option, from the ...
8
votes
3answers
1k views
How to make a loading indicator for every asynch action in an angularjs-app
I know there are several approaches to loading-indicators in angular js (this one, for example: https://gist.github.com/maikeldaloo/5140733).
But they either have to be configurated for every single ...
1
vote
1answer
180 views
When does AngularJS propagate model changes to the DOM?
In AngularJS, you can watch for model changes using $watch. So, if I write something like:
$scope.$watch('model', function (newValue, oldValue) {
// React to the change...
});
...then I can be ...
33
votes
5answers
13k views
Initialize AngularJS service with asynchronous data
I have an AngularJS service that I want to initialize with some asynchronous data. Something like this:
myModule.service('MyService', function($http) {
var myData = null;
...
15
votes
9answers
14k views
How do I implement the bootstrap navbar active class with Angular JS
If I have a navbar in bootstrap with the items
Home | About | Contact
How do I set the active class for each menu item when they are active? That is, how can I set class="active" when the angular ...
3
votes
1answer
651 views
What's the correct way to trigger jQuery DOM Manipulation from within a controller?
So I keep reading that jQuery manipulation from within a Controller is bad practice, but I'm not clear on why, or how to correct.
Below is code from a Youtube tutorial which even the video creator ...
1521
votes
8answers
154k 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 ...
2
votes
4answers
3k views
AngularJS directive with isolate scope - do I really have to call $parent everywhere?
I have an angular.js directive to create a button (hover classes, left & right icons, etc.). I'm using the automatic binding of the button's left and right icons via scope: { uiButtonIconLeft: ...
16
votes
5answers
19k views
AngularJS How to remove an Item from scope
Simple ToDo list, but with a delete button on list page for each item!
1. Relevant template html:
<tr ng-repeat="person in persons">
<td>{{person.name}} - # ...
3
votes
4answers
4k views
in angularjs how to access the element that triggered the event?
I use both Bootstrap and AngularJS in my web app. Now have some difficulty letting the two work together.
I have an element, which has the attribute data-provide="typeahead"
<input ...
56
votes
7answers
26k views
Watch multiple $scope attributes in AngularJS
Is there a way to subscribe to events on multiple objects using $watch
E.g.
$scope.$watch('item1, item2', function () { });
19
votes
3answers
20k views
Passing arguments to angularjs filters
I found a jsfiddle example of how to use filters with angularjs.
http://jsfiddle.net/ZfGx4/3/
Is it possible to pass an argument to the filter function so you can filter by any name?
Something ...
88
votes
3answers
17k views
Typical Angular.js workflow and project structure (with Python Flask)
I am pretty new to this whole MV* client-side framework frenzy. It doesn't have to be Angular.js, but I picked it because it feels more natural to me than either Knockout, Ember or Backbone. Anyway ...
406
votes
5answers
82k views
Databinding in angularjs
Could someone explain to me how databinding works in the AngularJS framework? I haven't found technical details on their site. It's more or less clear how it works when data is propagated from view to ...
57
votes
2answers
34k views
Insert HTML into view using AngularJS
Is it possible to create an HTML fragment in an Angular controller and have this HTML shown in the view?
This comes from a requirement to turn an inconsistent JSON blob into a nested list of id : ...
290
votes
5answers
93k views