Tagged Questions
0
votes
1answer
34 views
Can you use $index outside of ng-repeat?
Like so:
<div class="item" ng-repeat="priority in priorities" ng-class="{active: {{$index}} == {{routeParams.priorityId - 1}} }"></div>
<a class="carousel-control left" ...
0
votes
0answers
61 views
mouseover event Angular JS access attributes
I have the following directive
courseApp.directive("courseoverview", function() {
function link(scope, element, attrs) {
scope.switched = false;
//hover handler
...
3
votes
1answer
42 views
Is there a good way to 'Freeze' Angular scopes and children that are not being used
I am working on a project that basically consists of complicated form containers repeated in an ng-repeat. Each of these forms has enough functionality that it could easily be its own angular app, but ...
0
votes
1answer
56 views
AngularJS: page displays NaNs and displays data when it gets from server. How to prevent it?
Consider this conroller
$scope.transaction = {};
$scope.transactions = Transaction.query();
$scope.save = function() {
var transaction = new Transaction();
transaction.name = ...
0
votes
1answer
60 views
ng repeat not updating
Hi I am a newbie to angular js and I am hoping someone can help me out with the following problem.
I have a numeric field called numAdults and I need to show a set of field (such as name, address, ...
0
votes
1answer
135 views
angular 2-way binding broke when creating new child scope in directive
I am using custom angular form validation to validate fields based off the field having a value AND the selected value of a drop down. I use the same section of code (and therefore the same directive) ...
1
vote
1answer
73 views
AngualrJS: How to I pass the data to bootstrap modal?
Here is the plunker - http://plnkr.co/edit/iwvjJcUurUW2AvkDArfz?p=preview
I am using Modal from http://mgcrea.github.io/angular-strap/
I want to pass the transaction-id to delete function, how is ...
0
votes
1answer
114 views
AngularJS - Setting a variable on scope from directive
I'm trying to set a variable, selected.child, on the $scope so that I can use it elsewhere. I'm still new to scopes in Angular, but not sure why I can't set something on the scope from within the ...
1
vote
1answer
73 views
Angular directives collaboration
So here I am trying to implement an autocomplete suggestion with angular and I need your expertise.
Here is the html:
<div my-autosuggest>
<input type="text" my-autosuggest-input>
...
0
votes
1answer
250 views
Angular filter and order elements on click
I'm trying to filter a list of items (grabbed from JSON) onclick. I pull the data once from the server then would like to filter/order the elements using Angular.
Here is my plunker: ...
0
votes
1answer
63 views
How does angularjs react for changes of objects in the scope?
If there is a view that displays elements in an array, and the array grows; how does angular refresh the DOM? Does it just append the new elements to the existing view or recreates the whole thing?
I ...
0
votes
1answer
142 views
How to insert $compile'd HTML code inside the directive without getting $digest recursion error?
I have a directive that, depending on the ng-repeat item data (from the database), build custom HTML with a switch case:
app.directive('steps', function($compile){
return {
'restrict': 'A',
...
4
votes
1answer
532 views
Angular.js change on one item of ng-repeat causing filters on all other items to run
I'm still running into the same problem, filters and functions inside ng-repeat being called all the damn time.
Example here, http://plnkr.co/edit/G8INkfGZxMgTvPAftJ91?p=preview, anytime you change ...
0
votes
1answer
469 views
Angular.js view doesn't update when nested $scope array is updated
I am trying to make an angular.js view update itself when adding a comment. My code is as follows:
<div class="comment clearfix" data-ng-repeat="comment in currentItem.comments" ...
0
votes
1answer
270 views
Angular.js filters and functions on scope that is changing every second
The problem. I have a table of entries($scope.entries), each row(ng-repeat) with 5 columns, 2 of those columns have custom made filter for various transformations.
Now in the same scope I have ...