Tagged Questions
1
vote
2answers
48 views
Angularjs isolates scope directive with ng-repeat
I'm trying to use directive on ng-repeat items each with an isolate scope but it isn't working. I'm looping through each item and coloring it red with the inboxuser-select directive. However, when I ...
0
votes
1answer
20 views
order item in ngrepeat follow property of item
How can I order the post to top-down structure (the post which has highest likes number will be first and the last is the post which lowest likes number). To do that I set oderBy:likes.length but it ...
0
votes
1answer
24 views
angularJS: Why does binding to scope inside a directive result in lost content of ng-repeat?
I have this fairly simple HTML structure:
<div ng-controller="MyCtrl">
<div dir1="xy"><div>dir1static</div><div ng-repeat="item in ...
1
vote
3answers
43 views
Angular ng-repeat not loading
I have had this working in the past, I have moved the site about on localhost and now I can't seem to get ng-repeat to display results. Any ideas?
App:
var app = angular.module('Search', ...
0
votes
0answers
29 views
what are $$hashkey objects in Angularjs? How can I read multiple file inputs?
I am trying to get multiple file attachments from file inputs using the following directive:
var app = angular.module('app',['ui.bootstrap']).config(function($interpolateProvider){
...
0
votes
1answer
25 views
AngularJS data binding redrawing inside ng-repeat
If i had a scope like this one
$scope.array = [ { a: 1, b: 2 }, { a: 2, b: 1 }];
With a view:
<div>A:
<div ng-repeat="obj in array">{{obj.a}}</div>
</div>
Having in ...
0
votes
1answer
47 views
AngularJS directives with HTML5 drag and drop — issue with scope object
I'm fairly new to angular and I'm having a hard time wrapping my head around where the items are being pushed to. I am not sure if I am correctly setting up the functions to be used with drag/drop and ...
0
votes
2answers
64 views
How to use ng-repeat in directive with isolate scope?
I'm trying to use ng-repeat in a directive that has an isolate scope, but I can't seem to get it working.
When I add an isolate scope to my directive, ng-repeat seems to not be able to see items, ...
0
votes
3answers
52 views
Get JSON value from key value array with Angular
Hi I am new to angular and just trying to learn how to do a few things. I have got stuck in trying to display the following data. Using the Batarang plugin for chrome i can see my restful webservice ...
0
votes
0answers
55 views
ng-repeat load new updated array model but do not clear the previous value of array in template
I have a list of articles, every article has a list of comments with user.name and user._id of that comment. Click to each user, it shows a chat box to send message to that user. Everything is ok with ...
0
votes
1answer
77 views
AngularJS Directive for decimal numbers between 0 and 1
I want a directive in AngularJS which should allow decimal numbers between 0 and 1. In addition, it can allow "-1" as well.
For eg:
-1 is valid
0 is valid
1 is valid
0.12 is valid
0.99 is valid
...
0
votes
0answers
26 views
Problems with scope: ng-repeated and filtered custom directives
I have an array of objects that each contain a url, a title, and a description of page content, and I built a little directive to display the information.
On initial glance, my directive works fine. ...
0
votes
2answers
105 views
Transcluding a child directive into a parent directive
I'm a newbie to Angular and have been trying small samples to learn the code.
Firstly, I would like to thank the brilliant solutions posted in stackoverflow.com.
Saved me so many hours so many times ...
0
votes
1answer
34 views
Dependant ng-repeat in AngularJS
I have a following data structure coming from REST:
scope.taglist =
[ { name: "mylist", tags: ["tag1", "tag2", "tag3", ...]}, { name:
"mylist2", tags: ["tag2.1", "tag2.2", "tag2.3", ...]} ...
0
votes
0answers
48 views
What's the best practice for nesting complex views with directives and ngRepeats in AngularJS?
I've got a project that I'm work on with AngularJS and Masonry. There's an issue with initializing Masonry, the grid is broken or fails to render properly - by using a timeout, helps preventing it ...
0
votes
0answers
101 views
AngularJS: ng-repeat, checkbox group and dynamic ng-model creation
Basically I have a situation like the one depicted in this plunk: http://plnkr.co/edit/h0PPlArGfMmfxwBPVJJl?p=preview.
I am trying to dynamically create a set of related checkboxes from a json, ...
1
vote
1answer
104 views
AngularJS - Issues with events inside controller instances generated by ng-repeat
today I'm experiencing an issue that sounds weird to me but has some logical explanation for sure...
I'm building a table where I'm allowing to inline edit the fields values. You see a span with the ...
0
votes
2answers
68 views
Angular Dynamically load select options based on selected tab
The following code populates a select based on the tab you have selected. My question is how can i do this by loading the select options via api or just an external source?
Plunker
0
votes
1answer
133 views
Using ng-show to expand nested list on click
My code - Plunker
I used ng-repeat to render my nested list.
the list built in a way of a folder which is always displayed
and files which are displayed when parent folder is clicked.
The problem ...
0
votes
1answer
118 views
Re-binding a tree (Wijmo tree) with AngularJS
I am fairly new to AngularJS, and really struggling to re-bind a Wijmo tree (or even a tree implemented using UL and LI elements wth ng-repeat) with new data on changing of value of a Wijmo combobox ...
1
vote
1answer
106 views
How to update $scope.items array order in response to user re-sorting the DOM array using Angular-UI ui-sortable directive
I am using ui-sortable directive (from angular-ui ) in the view
<ul ui-sortable>
<li ng-repeat="item in items" >
{{item.property1}}
{{item.property2}}
</li>
...
1
vote
1answer
97 views
Updating $scope after $HTTP.post
new at this.
I have 2 div's;
When I use one to post new value into the server, the post action works fine.
How do ensure this post updates the scope in the other div? (to update the div with the new ...
1
vote
2answers
340 views
Angular select within a ng-repeat directive: how can I access the children scopes?
I've got an ng-repeat-ed table row, inside wich are a pair of angular selects:
<div ng-controller="midiCtrl" id="midi-ctrl">
[...]
<tr ng-repeat="plugin in ...
1
vote
1answer
51 views
“Deep” angular application vs. “wide” angular application? AKA many components/directives vs. many controllers
Which is better: to split up an application into many different directives/components or into many different controllers?
Splitting up the application into many different directives/components ...
0
votes
0answers
84 views
AngularJS ng-repeat not working with DatePicker controller
I can't seem to get the inlined calendar button associated with the DatePicker to work using ng-repeat on two DatePickers. They both work when I instantiate the DatePickers separately, but I wanted ...
0
votes
1answer
157 views
AngularJS Directive with no Template and Sharing the updates from parent scope
I have a very simple requirement where a directive is placed inside a ng-repeat in this I wanted to push down the changes to directive so it updates the UI. Meaning I want the value of Contact(not ...
1
vote
1answer
66 views
AngularJS directive
I am adding the following div multiple times on a page.
<div class="box span6">
<div class="box-header">
<h2 class="custom"><i class="fa-icon-group" ...
0
votes
2answers
160 views
Angularjs - Accessing shared service data from an ng-repeated directive
I'm trying to create drag-drop directives using Angularjs. Draggables in this scenario are generated by an ng-repeat directive, walking over an array. Code at http://jsbin.com/ECAWuDE/1/edit works as ...
0
votes
1answer
226 views
Angular - Toggling element class inside an ng-repeat based on radio input selection
I'm using Angular to write a questionnaire where the questions are retrieved from a resource. Based on the design, I have to toggle a custom icon instead of the standard radio button icon. The ...
0
votes
1answer
39 views
Modifying the parent $scope in angular
I have the following situation:
view+Ctrl 1: menu, select a city. $watch the city attribute, refresh the jobs in that city from the API when it changes, and modify $scope.model.myJobs accordingly.
...
2
votes
2answers
93 views
AngularJS ng-repeat in this model
I want to know if it is possible to use ng-repeat in a model that look like this:
Example Model:
$scope.items = {
item1:{[1,2,3,4,5]},
item2:{[a,b,c,d,e]},
item3:{[a1,b2,c3,d4,e5]}
};
The ...
0
votes
1answer
66 views
$rootScope's databinding could not get the right value
I write a demo to show this problem, when you change the select value, curTpl will change.
However, if you want to see the value of curTpl, the value don't change!
...
0
votes
2answers
323 views
Angular JS - Inplace Edit inside tree
I could not get inplace edit working within a tree.
I forked a fiddle where inplace edit worked within a simple array of input data
Here is the fiddle
http://jsfiddle.net/cguy/wcMzw/8/
thanks for ...
0
votes
1answer
263 views
How do I add an object to a nested array in AngularJS?
I'm new to AngularJS. I've researched the theory behind ng-repeats but I cannot find any good examples of 2-way data binding or object creation for nested ng-repeats. I understand that the syntax has ...
0
votes
2answers
370 views
Calling order of link function in nested and repeated angularjs directives
I'm fairly new to Javascript programming and I have only touched upon AngularJS. In order to evaluate it I decided to write a simple note application. The model is really simple, a list of notes where ...
0
votes
1answer
186 views
Binding checkbox values to respective arrays in angularjs
I have a form created at run time using angularjs. This form has 6 questions and where question 1 answers are radio buttons while rest of questions have checkbox answers.
form is created as
...
0
votes
1answer
90 views
AngularJS repeating input radio sets
I'm trying to get AngularJS to repeated sets of the same type of input radio fields.
Example:
<form>
<ul id="group1">
<li><input type='radio' ...
0
votes
1answer
50 views
Angular value not being set in controller, but can be set in view
I'm able to set the value of the query object within the view:
<button ng-click="query.Active = 'true'" ....
This updates the value bound to the filter and changes the view accordingly. Yet if I ...
0
votes
1answer
67 views
AngularJS Scope Object Inheritance
Hi I need a AngularJS Wiz to point me in the right direction been trying to get my head around AngularJS Scope and Inheritance.
I have a child Scope which I add to a Parent Scope then I want to add a ...
0
votes
2answers
181 views
Automatically load a view from the controller after a timer in AngularJS
Basically, what I am attempting to do is create a Slideshow. The reason why I am using Angular for this is to get the benifits from templating and hopefully load only one template to the page at a ...
0
votes
1answer
73 views
2-way binding for radio buttons in angularjs
i am kind of stuck here, i am new to angular js.
I have a form having number of questions. These questions are loading with angularjs.
html for form is
<form ng-controller="controller" ...
0
votes
1answer
32 views
Weird Angularjs behavior with object into a service
I have a service that get an object defined into it.
app.factory('Store', function($http, $q){
var obj = {
data : [],
load:function(params){
var def = $q.defer();
var count = ...
0
votes
2answers
106 views
Bitwise Angular Expression not working
I have a basic ng-show expression as follows:
ng-show="((message.status & messageStatus.Spam) != 0)"
However, this fails with the following msg: "Token '&' is unexpected, expecting [)] at ...
0
votes
2answers
79 views
Why is the value not updated to the view from within a directive?
I have this html:
<form name="form" novalidate data-ng-submit="TradeDaysFormSubmit()">
<div data-ng-repeat="tradeDay in tradeDays">
{{ tradeDay }}
<br />
...
0
votes
0answers
66 views
Create the duplicate select drop down on button click
I had the span with select drop down in view like this:
<div class="modal-body">
<span><button class="btn btn-primary" ng-click="showAttributes=true;addAttributes()">Add ...
2
votes
1answer
793 views
AngularJs- creating array with ng-model when checkbox selection
I am new to angularjs and want to create the model array when i click the checkbox and below is my code..
$scope.selectedAlbumSongs = [{
'name': 'song1',
'url': 'http://test/song1.mp3'
}, ...
1
vote
1answer
2k views
Problems parsing a JSON response using AngularJS
I am new using AngularJS and I am having an issue parsing a json response. This is the HTML code I am using:
<!DOCTYPE html>
<html ng-app>
<head>
<script ...
0
votes
1answer
67 views
How do I run custom js function when angular js finished retrieving data from the server (and updating the dom)?
I have the following code in the controller:
ViewCtrl.resolve = {
/**
* Fetching a user model from the backend to make it available to this controller.
*/
user: ['$http', ...
0
votes
1answer
199 views
Angular — accessing variables defined inside ngRepeat from outside
I am implementing in-place element editing in my Angular app and based my code on this answer http://stackoverflow.com/a/15453512/2026098, using an editing variable for each entry inside ng-repeat.
...
1
vote
1answer
743 views
AngularJS: Setting a variable in a ng-repeat generated scope
How do I access the set of scopes generated by an ng-repeat?
I suppose at the heart of this is the fact that I don't understand quite how the relationship works between a) the collection of objects ...