Tagged Questions
0
votes
1answer
25 views
Using value from one ng-repeat as part of another ng-repeat
I am trying to build a table with dynamic number of columns and would like to use those column headers to then decide which attributes of an object to display. Below is what I would like to do, ...
0
votes
0answers
12 views
angularJS Rails app, issues going through array
This is probably a easy problem but I have been staring at this code for ages and trying different variations but I cant seem to solve it.
I am looping through a JSON hash which consists of players ...
0
votes
1answer
11 views
Best way to create this Angular Directive - from / to date selector directive
I have a from / to date selection on my web app as below:
<div class="date-picker-horizontal">
<i class="icon-calendar"></i>
Select Date:
<input bs-datepicker ...
0
votes
1answer
17 views
Angular.js directive transclude ngRepeat - error
I'm trying to create a chart directive ( not interested in existing solutions ). I want to have definable templates for each bar using a sub-directive of bartemplate. I want to iterate the bartemplate ...
0
votes
1answer
11 views
Express Routes Generating 404 Response
I'm using MEAN stack as an extension of my learning node and express. What I'm attempting to do is simply link from one static page to another within the app.
My routes are defined as:
//Home route
...
0
votes
0answers
11 views
AngularJS - jquery plugin SelectBoxIt after ng-options finish populating select
I'm populating a select box using AngularJS with the following code:
<select ng-model="department"
ng-options="dept as dept.name for dept in departmentList"
class="fancy">
...
0
votes
1answer
10 views
jQuery scrollLeft not working with angular
I'm trying to programmatically scroll a div, overflowing horizontally. I feel pretty confident that my end result code should look like this:
var $element = $('#widgetRow');//or maybe ...
0
votes
1answer
19 views
How can AngularJS factory return an object
I have a requirement in which i should write factory. This factory should contain 3 function init, save and delete
I should call init function from controller. This function returns an object. This ...
0
votes
1answer
18 views
Angular change url based on selection
I would like to improve my links a bit for my angularjs app. I have a simple search page where people can narrow a selection of items by selecting categories on the left, setting price ranges, typing ...
0
votes
1answer
19 views
AngularJS - ng-class with value from ng-repeat
I'm trying to set the class of a tr using ng-class with the value of ng-repeat. All the examples I see online seem to call a function. Can i just set the ng-class with a value rather than using a ...
0
votes
0answers
9 views
AngularJS with angular-google-maps: Add Marker through fomr and Find me
I am trying to reproduce the example from http://nlaplante.github.io/angular-google-maps/ because it does 90% of what i want.
But so far i'm not having much success, it can find my location because i ...
1
vote
1answer
21 views
Dynamic creation of ng-model in angularjs
I have property fields that contains string array:
in controller I have:
$scope.data = {};
$scope.fields = [
"new0.name",
"new0.type",
"new0.address",
"new0.city",
...
1
vote
2answers
21 views
Hiding elements with ng-hide and radios?
I have a radio:
<div class="row">
<div class="col15">
<input type="radio" id="client_yes" name="client" ng-model="entry.client" ng-required="true" value="yes"><label ...
0
votes
1answer
23 views
AngularJS - hide a div when clicking in an inner element using a directive
I'm trying to hide a box when clicking on a link inside this box.
I wan't to use a directive to be able to add more code when once the box is hiden and to keep it generic so I can use that with other ...
0
votes
0answers
17 views
nvd3 as service in angular
I am trying to create a SPA in which each page had different sets of line charts.
I have created a graph service.
dashboard.factory('graphService', function() {
function drawGraph(chart, element, ...
0
votes
2answers
16 views
AngularJs ng-if for displaying or skipping on element
I am using AngularJS.
I have the following template:
<div>
... html content ....
</div>
I want to wrap the html content with an anchor only if the url model is not empty. For ...
2
votes
1answer
21 views
ng-required conflicts with ng-true-value and ng-false-value
if I set ng-required="_something_" inside a checkbox, ng-true-value and ng-false-value won't work.
See plunker here
What I want to do is to send "1" if it is checked and "0" if it's not checked
Any ...
0
votes
2answers
39 views
AngularJS: Add Elements to <li> dynamically
I am unable to populate list on clicking Add button. Problem is when I change the text field again, My List data gets changed (binding), how to avoid that?
HTML
<div class="control-group">
...
0
votes
2answers
18 views
Targeting nested array in ng-repeat
Can someone please advise me what I'm doing wrong here?
I am retreiving some data and injecting in to a controller as 'productInfo'.
I can load in the data fine but when I want to target specific ...
0
votes
1answer
31 views
Angular watch if condition is calling twice and thrice
I am using watch concept to know the status change happening in another controller and doing the respetive changes in the second controller , communication between the controller is throuogh watch .If ...
1
vote
0answers
22 views
AngularJS Filter - Load additional data while filtering
I read in some questions here, that you shouldn't change the data inside the filter. Now my problem is that the API I am using doesn't support a query to filter the data from the server. My only ...
1
vote
2answers
31 views
AngularJS: nested objects from dynamically set model names
I have an array containing variable names, example:
var names = ['address.street','address.city'];
I want to create input fields out of these, and I'm using AngularJS. No big deal:
<div ...
0
votes
1answer
29 views
Angular call different controller methods for different urls
I have a single page application in which the footer contains multiple links for About, FAQs, Privacy etc. Currently i am using angular-strap modal to show a modal for each link. The code for that ...
-2
votes
1answer
39 views
Angular Dependency Injection, Passing values between modules using service
I have read about the dependency injection in angular. I thought to test it. But as I inject the module, I want to pass the values from one module to another (I am outputting on console
(Edit: ...
0
votes
1answer
29 views
Separation of client-side logic in Angular JS - ever increasing
I am working on a fairly large angularJS project where we have many controllers, services, modules and interactions amongst them.
We've tried to keep services independent in the sense of the ...
1
vote
2answers
27 views
$apply doesn't work on location changes prompted by Back button
I'm working on integrating Angular into a legacy app. This requires updating the route from outside of a controller, because the old app has a LoadPage script outside of Angular that must execute a ...
2
votes
2answers
36 views
Angular js - Highlight dom when value changes
Angular noobie here.
I would like to know what is the best way to change the dom when a value in the scope changes by some means. I read that its not good to put the dom manipulation logic in the ...
0
votes
0answers
21 views
ng-switch with animation resizing looks buggy
Using ng-switch with animation inside a div container I am struggling to figure out how to avoid the div from resizing when the animation is running see this plunk
If I set the height of the div it ...
0
votes
0answers
6 views
angularjs anchorScroll preventDefault, but not to the correct anchor
i want to use anchor to scroll in the page, and the URL is using the angularjs routing, like http://xxx:000/main.html#/events, and if i click a btn to goto the anchor, the URL will be like ...
0
votes
0answers
11 views
How to reference existing types in JSDoc/VSDoc comments in Visual Studio 2013?
Is there a way to reference AngularJS types inside VSDoc comments in Visual Studio 2013?
0
votes
1answer
32 views
AngularJs. Render table with ng repeat and ng switch
I'm trying render table with two columns using angularjs directives.
<table>
<tr ng-repeat="message in messages" >
<td ng-switch-on="message.network" ng-switch when="twitter" ...
1
vote
1answer
30 views
angularjs anchor in iterator (anchorscroll, ng-repeat,loop)
for example,
<div ng-repeat="item in items">
<p>item.title</p>
...
...
...
<p>item.up</p>
</div>
As i know ,anchor scroll need to specify an ...
1
vote
2answers
30 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 ...
0
votes
1answer
10 views
Add/remove indicies in AngularJS model
AngularJS ubern00b here. Here's an angular module that I built:
var myApp = angular.module('myApp',[]);
myApp.controller('RentalAppCtrl', ['$scope', function($scope) {
$scope.master = {};
...
1
vote
1answer
19 views
AngularJS ForEach push new item into object
I have a JavaScript object which has a list of retailers
var listRetailers = [
{"url":"http://www.fake1.com", "img":"images/1logo.jpg"},
{"url":"http://www.fake2.com", "img":"images/2logo.gif"},
...
0
votes
1answer
18 views
Retrieve inner HTML of AngularJS directive before templateUrl overrides it
I have a directive I use for form validation boilerplate which I recently refactored. Allow me to explain the directive a little further before expanding.
The directive usage:
<form ...
0
votes
0answers
13 views
item detail from RouteParam in angular.js
I am doing a basic angular example which shows a list view and a detail view.
Here is the plunkr: http://plnkr.co/edit/YduJGYQr4lFGK8EXdSXs
It currently is showing the detail by using the ...
0
votes
0answers
14 views
AngularJS and Flexslider loading
How can I get Flexslider to fire once all my API images have loaded?
The problem is that Flexslider fires before Angular can pass in the large images I'm retrieving from an API.
If I refresh a ...
0
votes
2answers
29 views
Angularjs - log in, stay on page, load div after authentication
I am spinning in circles and hope someone can help me out with this.. Angularjs newbie here...
I am not sure how to approach this ..
I need to load a login form to any opage on the site (without ...
0
votes
1answer
32 views
How do you sort an AngularFire collection?
$scope.items = [];
var ref = new Firebase("https://****.firebaseio.com/");
var query = ref.limit(5);
angularFire(query, $scope, "items");
<div ng-repeat="item in items" >
...
0
votes
1answer
16 views
Check checkbox if function returns true in angular
I have a couple of checkboxes for available cars and I need to figure out whether they have to be checked if the user has rented any of the cars.
So I have an array of all available cars called ...
0
votes
2answers
9 views
AngularJS testing with Jasmine unable to call “angular.mock.module” while using angular-mocks.js
I'm trying to get a basic unit test working and am running into an issue using angular-mocks.js. Hopefully this code will explain my situation.
describe("peconfigApp", function () {
...
0
votes
0answers
14 views
http interceptor not returning parameters to error function
I need to make an interceptor that adds the token and a few other things on the url before the request is made. Also, if the request fails I need it to do the following:
if the response came back ...
0
votes
2answers
18 views
Angular sub-views
I google a bit about the topic but I couldn't get a clear answer on the subject, so apologies if this seems a pretty beaten down question. I've started with Angular not long ago, and I really want to ...
0
votes
1answer
23 views
How does this link function know what “tabsCtrl” references?
Reading through the AngularJS documentation when I came across this piece'o information in the section titled "Creating Directives that Communicate"... looking further at the js code for this example, ...
2
votes
0answers
60 views
Confirm that Batarang is broken [on hold]
Not just me saying
I would like to share my recent experiences using Chrome 3.0
debugging developer tools together with Batarang. After much struggle,
I am led to the conclusion that the recent ...
0
votes
1answer
17 views
How do I specify JSONP as the dataType in an angular $http service request?
I'm familiar with using jQuery's $.ajax:
$.ajax({
url: //twitter endpoint,
method:"GET",
dataType:"jsonp",
success:function() {
//stuff
}
});
How can I specify the JSONP datatype to ...
0
votes
0answers
13 views
Angular.js animation, combining css and js
What I'm trying to do is fadeout old view and fadein new view, the thing is, new content needs to be absolute position until the old one fades out, and I would like to give it some top and maybe ...
0
votes
1answer
33 views
What how can AngularJS be used replace .asp includes?
Building a small framework for .aspx sites. Project is called Dwarf and available on GitHub.
The problem that I am addressing is working with partials. For example in one of my pages I have a section ...
0
votes
1answer
18 views
SignalR in an Angular single page application with multiple routes listening for events
I have an Angular application where certain routes listen for certain SignalR messages and some messages are listened for by multiple routes. Everything is working fine but when I navigate from Route ...