Tagged Questions
0
votes
0answers
10 views
AngularJS - ngrepeat form input elements dynamically filled with default values to post
http://jsfiddle.net/9sCnC/12/#
I'm going through a json file and parsing it through ng-repeat, a button on each item opening a modal window.
In this window a form is generated with data I would like ...
0
votes
1answer
27 views
How to find a watch in scope.$$watchers
I'm using angularjs and need to find the watch of the ng-repeat, because I need ng-repeat to stop working from a specific point. this my code:
<ul>
<li ng-repeat="item in items">
...
0
votes
1answer
29 views
How can I download a file instead of opening it in the browser (Firefox)?
I am working with AngularJS. I want to list the files as <a> tag in a page. When I click it, the corresponding file should be downloaded.
I am trying withe following code,
<div ...
0
votes
1answer
37 views
Angular JS custom table directive
In the project I am working on I have a lot of serial true/false data that needs to be displayed in different ways. I have been working on a directive that will allow me to pass in the model, the ...
0
votes
1answer
17 views
How can I read List of objects in angularjs
How can I read below result in angularjs in controller.js
{
"placeList":[
[
{
"address":null,
"name":"Len The Plumber"
},
{
...
0
votes
1answer
19 views
Angularjs app logic structure help required
I've recently started with Angular and would really appreciate some help on how to properly structure my code the angular way. This is more of a meta question rather then technical question.
I have ...
0
votes
2answers
89 views
How to pass a query param from controller to service in angularjs?
I have a form, where in i submit a text using ng-click, now it calls a rest service and insert into the DB - working fine. at the same time, in same function, it calls another rest service but nothing ...
0
votes
1answer
22 views
how to load json data from url in angularjs
I'm trying to create graph in angularjs. it's working fine but i don't know, how can i bind data from json url in shipmenttracking variable. please help me.
myApp.controller('AppCtrl', ['$scope', ...
0
votes
1answer
43 views
How can I download the files using AngularJS?
I want to list all the files in <a></a> when clicking it we need to download it from the corresponding folder.
I tried the following code
<div ng-repeat="file in files">
<a ...
0
votes
2answers
18 views
Form data always going null for text field in angular js and rest service spring
I am new to AngularJS and not sure where I am missing, though I know its a minor mistake which I am committing. Please help me out with below scenario.
I have a form where in I write a post ...
1
vote
2answers
42 views
Counting the total of nested ng-repeats and updating multiple controllers/models in angularjs
In my current project I have a two nested ng-repeats, where the outer ng-repeat provides an argument the inner ng-repeat needs to filter out the data + some additional custom filtering on the ...
0
votes
4answers
45 views
How to display JSON list data in angularjs
I am new to Angularjs and having trouble displaying data . i.e. Json array
This is the result of my rest service call:
...
0
votes
1answer
84 views
AngularJS - View not updating after set new value to array
I have 2 controllers, the first (EventosListCtrl) works for me perfectly, shows me the list of data indicated by GET, but when I pressed the button to bring the data to show in the second controller ...
0
votes
1answer
33 views
How can I disable the already selected value from the dropdown using AngularJS?
I want to disable the already selected value from the dropdown using ng-options AngularJS.
<select name="fruit" ng-model="selectedFruits" ng-options="fruit as fruit.name for fruit in ...
2
votes
0answers
48 views
Custom filter overrides original data or causes infinite $digest loop
Initial Situation
TL;DR
I want to filter a nested array with a custom AngularJS filter. Unfortunately not only the data for ng-repeat are filtered but the original object from $scope too.
I have a ...
1
vote
2answers
35 views
Set defaults for a dropdown generated using a ng-repeat
<ul ng-repeat="books in companyBookData.Bookparts" style="float: left">
<li>
<select
name="Zone"
id="Zone"
ng-options=" ...
1
vote
2answers
60 views
A directive to format phone number
I was wondering how to automatically format a number in an input field using an angularjs directive? When I type in an input field say 6042919283 I want it to be shown as 604-291-9283.
Thanks
0
votes
1answer
50 views
Angularjs: How to update parent scope in directive without using isolated scope when the attribute is passed in within ngRepeat
I have a simple angularjs directive that uses JQuery to convert a template to a draggable dialog
var myApp = angular.module("myApp", []);
myApp.controller('myCtrl', function ($scope) {
...
1
vote
2answers
36 views
How to get the item count for an object attribute on ng-repeat
My application is using Bootstrap 3 and AngularJS. I am trying to count the number of farmers markets for each state based on the filtered results on ng-repeat.
My JSON data looks something like this
...
0
votes
1answer
38 views
How can I limit the size of attachment (file upload) in AngularJS?
I want the best way to upload files with loading image in AngularJS. At the same time i want to limit the size to 10MB.
Please give the best way to achieve this?
0
votes
2answers
36 views
How can I pass an ng-repeated object to my Angular directive?
take a look at my code here...
Controller ("tasks" is an array of JSON objects resolved in my Routes.js):
app.controller('testCtrl', function(tasks){
$scope.tasks = tasks.data;
};
HTML:
...
3
votes
3answers
36 views
What is the use of custom directives in Angularjs? [closed]
I'm newer to angularjs, it's difficult to understand the custom directive examples and the releated blogs.
why we use it and what is the usage of custom directives.(Using the built in directives is ...
1
vote
1answer
68 views
jQuery function in AngularJS way
I'm fresh new in AngularJS, and i'm moving some code from jQuery to Angular, but still having trouble understanding it's logic, so switching to Angular made comfusion. I have following example which i ...
0
votes
2answers
66 views
Dynamic Templates in Angular custom directive (within nested ng-repeats) not working
I'm a newbie to Angular/JS frameworks in general and I'm trying to get this airplane seating data to show up using dynamic templates but its not working.
I tried following the guide at this site but ...
0
votes
3answers
29 views
Obtain data from the $scope
First off I'd like to say that I'm just starting with AngularJS, so please excuse me if this is a stupid question.
I have a controller that performs an AJAX request and it returns a JSON object. This ...
0
votes
1answer
38 views
Angular ng-repeat not reflecting update to list
I have a directive that injects a dynamic template on ng-repeat. I'm wanting to add to that list, which, I can, but for some reason none of the items I add to the list are reflected in the view. I ...
0
votes
1answer
35 views
Generating a table with interpolate and transclude
I'm trying to put together a reusable but custom table-type control using directives and tansclude in AngularJS and I'm running into a wall with not being able to customize the content that goes into ...
0
votes
0answers
50 views
angularJS watching values of an object list
I have a List containing objects in my angular js project. Each object of the list contains a name and a value. This value is bound to a text field. The list is displayed on a grid and when ever the ...
0
votes
1answer
34 views
Template is compiled before the result is returenf from $http service
Hi I am trying to retrieve data from the server using $http, and correct data is being retrieved from the service, the data is -
[{
"URL":"someimg.jpg",
"TITLE":"Test Demo",
...
1
vote
1answer
63 views
Getting Angular ng-class to $apply before an ng-repeat animation
I have an animation that animates an element in an ng-repeat to the left or right depending on which button is clicked.
In one manoeuvre, I set a ng-class (the animation class) and then remove the ...
2
votes
1answer
43 views
deregister watchers in ng-bind when item is not visible
I am using AngularJS with ng-repeat. Each item in the repeater is huge item that contains many ng-binds and the list wrapped with a scrollbar. I would like to write a code that deregister the watches ...
0
votes
1answer
38 views
AngularJS: How do I hide clicked element in angular?
I'm totally new to angular and I'm finding that doing simple things aren't as obvious to me? I have a list of items that I display using ng-repeat. I simply want to hide the element once I click on an ...
0
votes
2answers
25 views
controller and link functions in directive do not have same scope
I have an issue with my angular.js directive.
It should be a kind of autocomplete, in directive's controller property I'm loading an array of values and inside link function compiling template to ...
4
votes
1answer
31 views
Set css to $templateCache.get() html in link function
This directive is executed for everyday in a schedule table. After I have rendered the event I wanna be able to modify the css properties depending on some stuff.
The problem is that when the event ...
0
votes
2answers
107 views
angularjs ng-repeat list not updating - directives
I am new to angular and I have the following code:
Here is my html:
<drawer title="'Add a new Item'"
visible="showAddItemDrawer"
on-close="showAddApplicationItem = false">
...
0
votes
2answers
52 views
ng-repeat repeating elements but not showing content inside ng-view
I have a controller:
function ItemsController($scope, $http){
$scope.init = function(){
$scope.siteItems = [
{id:'1', path:'img/1.png'},
{id:'2', path:'img/2.png'}
...
0
votes
0answers
37 views
How do I filter html content angular
No matter what I try, I am unable to get this to work. I have downloaded repositories that do exactly what I am trying to do, but I have no success.
I am trying to filter through a repeater of divs ...
1
vote
1answer
53 views
Change ng-include template rendered inside ng-repeat
I've got an ng-repeat where each of the instances contains an ng-include. Like so:
<li ng-repeat="item in items">
<div class="item-actions" ng-include="actionsTemplate"></div>
...
0
votes
1answer
29 views
AngularJS - Repeater item updating a parent
I have a question that contains 4 answers. The answers are in a repeater with an ng-click binding that sets the answer to answered=true, but I also want to set the parent question to answered = true ...
0
votes
1answer
80 views
How can I get all the selected objects of Checkboxes in AngularJS?
I want to get all the selected objects of the checkboxes using AngularJS.
Below is my case
My view.tpl.html
<tr ng-repeat="item in itemList">
<td>
<input type="checkbox" ...
0
votes
1answer
40 views
AngularJS $scope issue
I'm having an issue with Angular scope, specifically where I can't get the data to be injected into my view. I understand that the ng-repeat creates it's own scope, as well as ng-view, but for ...
1
vote
2answers
68 views
Wrapping an ngRepeat inside another directive
I'm trying to write a paginator as a directive for my application, but I can't seem to get it to work. Every where I've looked suggests using $compile, but I can't get that to work at all.
This is ...
3
votes
2answers
164 views
Remove empty select option in angular ng-repeat
I am using ng-repeat to render options with different value and text here, and also setting the default one.But again angular adds an empty undefined option.
<select ...
0
votes
1answer
50 views
Angularjs : call services method inside a function
I have this simple function js getItems(), inside I call a services items.getItems(..) ,
I would like that the function return me a data. I tried to associate the var to function but the result is ...
0
votes
3answers
69 views
AngularJS ng-repeat setting default select value
$scope.activities =
[
{ id: 1, type: "DROPDOWN_MENU", name: "Dropdown Menu" },
{ id: 2, type: "HORIZONTAL_BAR", name: "Horizontal Bar" }
];
<select ...
0
votes
0answers
50 views
Accessing parent $scope
I have posted earlier this post with the choice of not providing all my code. But now im stuck since with the same problem so I give it a change with providing all my code.
I know its not easy to ...
0
votes
1answer
56 views
AngularJS write and then edit array
I have a piece that when you click the Add button a modal appears and has 3 boxes you fill in details, this when saved shows a list on the main page with the title of your newly written item.
When ...
1
vote
3answers
66 views
Auto suggest with 20,000 entries
Hi I am building a form that uses autosuggest. The way it works is I load about 20,000+ customers into my angularjs app. Then when the user types into the input field the name of the customer they ...
1
vote
2answers
96 views
AngularJS creating (and binding) form elements dynamically based on API response
I'm trying to create a member's form with all the pre-defined phone types.
I'm making two api requests for member and phone types. Here is what I've:
First request with member's information:
...
-1
votes
3answers
136 views
Call another controller from inside ng-repeat
I am new to angular and I am trying to call a function from another Controller. I do not want to define an addIssue function in ItemsController which calls IssuesController.addIssue or share a ...