Tagged Questions
0
votes
1answer
17 views
AngularJS 1.2.0-rc.2 vs 1.2.0 element binding
I recently upgraded my AngularJS Framework from 1.2.0-rc.2 to the 1.2.0 release and came upon a strange issue that I haven't figured out a way around. The issue I had previous resolved was forcing an ...
0
votes
0answers
3 views
Run Twitter and Facebook Share Button Code After ListCtrl Update
I'm building a website where I need to display Facebook like/ share buttons and a twitter share button on several elements in a list. Basically I have a list of events that are loaded asynchronously ...
0
votes
1answer
15 views
Error from directive when element is removed
I'm using an ad-hoc ngIf directive for Angular 1.0.3 acquired from this SO answer.
// effectively
app.directive("ngIf", function () {
return ...
0
votes
2answers
9 views
Why does changes to the outer scope from within a directive require scope.$apply() even if I am setting scope option to false?
Lately I've noticed that changed to some angular - provider objects, or to my own - outer scope(out side of the directive, in the controllers) required wrapping the code in scope.apply().
can anyone ...
0
votes
1answer
22 views
compile directive inside directive AngularJS
I am trying to use a HighlightJS directive on <pre> blocks rendered by a Markdown directive.
Here is an plunker recreating the problem:
http://plnkr.co/edit/qZlMkjNZglV453caNphy?p=preview
In ...
-1
votes
2answers
48 views
Where is the HTML source code of a page when using angular?
I have a drop down list and was wondering what the 'values' are of that dropdownlist
<div>
<select ng-model="lastItem" ng-options="cc.congressLongName for cc in ...
0
votes
1answer
15 views
Send array via GET request with AngularJS' $http service
I need to send a GET request using the $http service. One of the parameters will be an array of ids. The url looks like this one mysite.com/items?id[]=1&id[]=2&id[]=3&id[]=4
I tried this ...
0
votes
2answers
39 views
Angular newbie: non-trivial form validation?
I am new to Angular, and I would like to do some non-trivial input validation.
Basically I have a table. Each row contains three text inputs. When the user types into any text inputs, I would like ...
0
votes
2answers
35 views
adding small container into the big container,if in big containers one floor are 2 small containers (see pictures)
i want that user can write text in container "your text" then press add. Then there will get created new container with users provided information in the big container (red line). i can do that,but ...
1
vote
1answer
22 views
Validating routes in angularjs
Right now I'm working on a one page angularjs app using angular to do the routing. To log in a user I validate their username and password using an $http request, I then redirect them to /user_home. ...
0
votes
1answer
47 views
How to convert c# arrays to JSON with one array item propety value set as reference to item from another
To properly bind Java script arrays to AngularJs view I need them look like:
var ingridients = [
{name: 'Vodka'},
{name: 'Gin'},
{name: 'Rum'}
];
var drinks = [
...
0
votes
1answer
36 views
Dynamically reloading ng-repeat data in the DOM
I have the following code in my view:
<li ng-repeat="i in items">{{i.id}}</li>
I would like the ng-repeat to be trigged dynamically when new values are added/removed from items. As in, ...
0
votes
0answers
11 views
how to use fundoo.services
Hi I am new with angular, for my project I need to implement a modal, I found this on internet:
http://www.befundoo.com/blog/angularjs-popup-dialog/;
I followed the instruction and got this error:
No ...
0
votes
0answers
14 views
Phonegap and window.device is undefined at onDeviceReady for iOS7
I need some help on understanding why does this happen?
It's very strange, but window.device is undefined inside onDeviceReady event handler BUT at the same time it is initialized and accessible, and ...
2
votes
0answers
22 views
Access a div color-picker element through form controller
I am using this library in order to add a color picker feature to my AngularJS app.
I would like to allow my client to use a color, which will then appear before him as small square div, with rounded ...
0
votes
2answers
37 views
0
votes
2answers
32 views
calling a HTTP get method to populate the result in drop down using angular JS
I have all controllers defined at one place.
$routeProvider.when(pages.hello,
{
templateUrl: 'test/hello.html',
controller: 'myController',
access: access.anon,
...
0
votes
2answers
26 views
AngularJS : Write HTML Output to textfile
I'm working on an AngularJS 1.5 project with PhoneGap.
Now I would like to write the HTML output to a textfile.
I was trying to use the innerHTML function, but this returns the wrong output, ...
0
votes
2answers
37 views
AngularJS not filtering products list
I am having an issue with AngularJS filtering my products list. I have done a few console.log queries on my variables and all seem fine. The problem is that the view does not update to show the ...
0
votes
0answers
23 views
AngularJS two-way binding in route templates when using routeProvider templates
I have an app where the sidebar will show a list of to do messages, and a list of processed messages (navigate with tabs), and clicking on it will show the details of the message on the main section ...
3
votes
2answers
37 views
Issue with $http service in Angular 1.2
I just started using Angular 1.2.0 in my development app, and I noticed that the following function doesn't work anymore, take a look:
var myItems = angular.model('myItems', []);
...
0
votes
1answer
16 views
angularjs option list becoms empty when i select an option
I am working on a django-tastypie api application where i am using angularjs as JavaScript framework.what I am doing is i have a list of curriculum objects where each curriculum object contains a list ...
0
votes
1answer
19 views
ng-model set value of select
This is my angularjs directive:
dicApp.directive('listpanel', function ($resource) {
return {
restrict: 'E',
template: '<select ng-model="selectedDictionary" ...
0
votes
1answer
20 views
How can I encapsulate a $http.put into a function that does something and then returns a pass or fail promise?
I have the following code:
var requests = $scope.grid.data
.filter(function (rowData, i) {
return !angular.equals(rowData, $scope.grid.backup[i]);
})
...
0
votes
0answers
9 views
Dojo Toolkit support for future web standars
I have been very interested in what angular.js is doing to support web standars, like web components, html templates, object.observe(), model driver views, shadow dom, etc.
My question is, What is ...
0
votes
1answer
25 views
What happens with $q.all() when some calls work and others fail?
What happens with $q.all() when some calls work and others fail?
I have the following code:
var entityIdColumn = $scope.entityType.toLowerCase() + 'Id';
var requests = $scope.grid.data
...
0
votes
2answers
19 views
AngularJS - Run code after multiple resources load
I want to execute some code once I load resources from my back-end.
I was able to do this by using a callback on ONE resource request like this:
$scope.resrc = Resrc.query({idResource: 1}, ...
0
votes
0answers
15 views
Tree Table With Angular ngRepeat
We need to display some tabular data according to a hierarchy. For example a list of country with their population and the area they cover, along with some of their cities. It could go to deeper ...
0
votes
0answers
18 views
angular dynamic templating directives
I have a list of different field types and I want to apply a template based on type. I can get it to work if I use inline templates like this:
flowPageModule.directive('myField', ['$compile','$http', ...
5
votes
2answers
58 views
AngularJS Scope difference 1.0.x vs 1.2.x
As of the release of the next stable AngularJS, I am migrating my application from version 1.0.8 to 1.2.
In AngularJS 1.0.8 it was possible to set up an isolated scope for directives like follow. The ...
0
votes
1answer
32 views
ng-class to highlight active menu item based on ng-repeat. AngularJS
I have menu based on following:
Menu:
<nav data-ng-controller="menuContrl" class="menuItem">
<a data-ng-class='{active:isActive("/{{item.path}}")}' data-ng-repeat="item in menu" ...
0
votes
2answers
22 views
Adding an AngularJS resource that may or may not exists
Using AngularJS 1.0.4
One of our Angular apps is dependent on a resource being loaded before anything else can be loaded. We do this from a service that gets initialized in app.run() and then ...
0
votes
1answer
25 views
angularFireCollection callback FireBase
What if I don't want to directly assign my collection like this:
$scope.items = angularFireCollection(ref);
Because I need to access the object in a callback once it's recieved:
...
0
votes
0answers
10 views
Create service in ngView and use it in directive
I have a SPA with the main content (full.html)
<div class="row" id="main">
<div class="large-9 push-3 columns">
<div ng-view></div>
</div>
...
0
votes
1answer
34 views
AngularJS nesting elements with multidimensional arrays and displaying them with a click
Here is the fiddle that accurately displays information but is visually not correctly positioned.
http://jsfiddle.net/LhRfq/
My scope is a three dimensional json object.
The first level array items ...
0
votes
1answer
19 views
Base Href and Angular Routing and Views
I'm developing a web application which defines the <base href="phoenix/"> in the header as explained in this article.
The default URL that is mapped is http://localhost/phoenix/ however even ...
0
votes
0answers
10 views
Getting all events for all calendars with Google API Javascript Client
I'm trying to get all of a user's events, for all of their calendars on Google Calendar. I'm doing this by first making the call to gapi.client.calendar.calendarList.list, and then using the IDs ...
0
votes
2answers
34 views
linking promises, or one promise triggers another
I'm building a weather app where I first have to get the users location, then make the request to get the weather.
So I have a GeolocationService and a WeatherService. My WeatherService is currently ...
0
votes
0answers
20 views
AngularJS - dynamic error message on validation via directive
I need some help. I'm doing some validation on an input element and would like to set a dynamic error message in javascript. I am aware of the following way to do this, but my situation has become ...
0
votes
2answers
40 views
Angular + Requirejs - Loading in the wrong order
I'm trying to have angular and jquery loaded with requirejs. The best I can do is that 50% of the time everything loads correctly, the other half I get the error No Module: mainApp
I'm assuming this ...
0
votes
1answer
28 views
AngularJS $scope not updating on click
Sometimes i'm struggling to understand the angular scope, and its inheritance, and today seems to be one of those days...
Basically i just want to disable a button when its pressed, im using ...
0
votes
0answers
36 views
Passing arrays as query parameters in angularjs
Say I have a resource call like so:
Service.get({id:[1,2,3], ...}, ...);
I want this to create a request like:
/service?id=1&id=2&id=3
As far as I can tell, this is the proper way to ...
0
votes
0answers
29 views
Why is angular printing out my javascript object in a weird (key, value) order
So I have an array of javascript object named user with the following format. In an array called users.
{userId: 4, userName: "bob", password: "password", _id: "527abf6ebaa5eb8426000001", __v: 0}
...
0
votes
1answer
24 views
Including a plugin with angularjs?
I'm trying to get the angularjs grid to work with row drag and drop support. But it looks like they have pulled that functionality out into a plugin, and not updated their documentation at all. That ...
1
vote
1answer
36 views
Format <input> to display currency as user types
I'm looking for a way to format an input element to format for currency. Specifically I want the commas in there for thousands.
The initial solution was to just format the value in the controller and ...
0
votes
2answers
15 views
angular ng-repeat function app function not defined
I have a created an angular repeat function. which loop my section container. so ultimately this repeat function will loop content within the section tag.
Unfortunately I am getting a console error, ...
1
vote
2answers
34 views
Why ng-app not ng-module?
I understand that ng-app initializes a module in AngularJS as follows:
var app = angular.module('myApp', []);
<html ng-app="myApp">
But when I teach this to someone new to AngularJS or watch ...
0
votes
1answer
32 views
Directive interacting with rootScope not working in Angular JS
I am trying to interact with the rootScope in order to make a modal appear. I have a very basic directive that I am trying to use rootScope paired with an ng-show.
Here is the code for the directive:
...
0
votes
1answer
53 views
How do I switch views in Angular?
I am new to Angular, and have read all the tutorials, but am just starting out building my own app, so I am at the steep bit of the learning curve!
I am building a questionnaire. I would like to show ...
4
votes
1answer
73 views
Angularjs <style> tags
I am struggling with following understanding:
How can I add media (query) depending styles dynamically to elements/the DOM?
Following issues I ran into:
1) I know that AngularJS cannot manipulate ...