new

Stack Overflow for Teams

A private, secure home for your team's questions and answers.

Learn more
0
votes
0answers
38 views

AngularJS Controller resetting $scope variables after setting

I am trying to implement a simple datepicker using the akveo AngularJS project. When I change my date,I am setting a $scope variable from on-change function. When I debug, I can see that the correct ...
1
vote
2answers
14 views

Multiple $http.get operatios and save the information in one $scope variable

I need to do four $http.get call and I need to send returned $scope variable to the one HTML to print all the information. In the moment I have the next code in JS: (function (ng) { var mod = ng....
0
votes
1answer
39 views

AngularJS infinite loop on scope function call

i am new in the AngularJS programming.So I call getDevice() scope function in my html and I seem to get in infinite loop.Console log: angular.js:14800 Error: [$rootScope:infdig] http://errors....
0
votes
2answers
55 views

Why can't I set input values when ng-model is used?

I'm trying to populate some default fields in a form. The AngularJS way as far as I know is to use the controller to set these values. I'm using components - which I'm starting to regret given that ...
-1
votes
2answers
80 views

angularjs does not display binding value

I have a problem with angularJS ng-model binding. I have the following html: <div class="col-md-12"> <form class="form-horizontal"> ... <div class="form-group"> ...
0
votes
2answers
49 views

Creating HTML Table in AngularJS

var str1 = "Sarah"; var str2 = "Tom"; var strTable = "<table style='width:100%'><tr><th>"+ str1 +"</th><th>"+ str2 +"</th> <th>Age</th> </tr> <...
0
votes
3answers
67 views

Dropdown not updating based on scope value angularjs

I have been working on some functionality over last few days. Whenever I select a dropdown, index values needs to be captured. At the same time, when I click remove button, one TV should be removed ...
0
votes
0answers
30 views

How can we apply class from html to angularjs template

I have my templte in angularjs : <ul class="pagination"> <li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == 1 }"></li> <li ng-if="directionLinks" ng-...
1
vote
1answer
63 views

How to get selected values from custom drop-down using angularJS

actually I have been implemented one custom drop-down using <ul> & <li> elements in my application. And right now I am able to select dropdown values by using mouse click but as part ...
0
votes
2answers
40 views

How to access child scope?

In the below code, I'm trying to get a console log in the Directive (child scope),I need to get scope details.I tried adding a scope variable to the function in the directive also, but didn't work. ...
5
votes
2answers
178 views

Directive for custom fields in form [scope is not updating]

I am trying to create a directive for custom fields in the form. I am able to create directive but not able to update scope. See Plunker demo for more idea about problem Issue I am facing is when I ...
0
votes
1answer
31 views

Angularjs ui grid

catsUser.controller('MainCtrl', ['$scope', '$http','uiGridConstants','$interval', function ($scope, $http,uiGridConstants,$interval) { $scope.resultSummary=true; $scope.getEventJson=...
1
vote
0answers
56 views

Angular JS-Storing the row wise table values into the database

I have this situation: I need to bring-up a table structure into a HTML page.One of the columns in this table has to be brought from a table stored in the database.This column value along with two ...
0
votes
1answer
65 views

Trying to display scope in html - angularJS/ionic

Trying to display scope in html - angularJS/ionic Trying to display the title to my web page but nothing is showing up. I'm fairly new to angular and ionic framework. If anyone can point out what I'm ...
0
votes
2answers
50 views

Attribute binding not working on metadata

For some reason I cannot get bindings working for attributes of elements in the head element. Surprisingly, the same bindings do work for elements in the head element. I've pasted the code I'm using ...
1
vote
2answers
861 views

How to handle $ctrl. in AngularJS?

I have a Methode from an API. It returns a promise which resolves to an $ctrl(?) object. This objects should contain a measurement and will be updated whenever it receive a new data. getMeasurements....
0
votes
2answers
66 views

Can't display JSON-objects from session-storage in AngularJS

I'm having problem displaying a JSON-object named "currentSet" from session-storage. When I instead use a JSON-file from a folder everything works fine, which means the HTML-code is probably fine. I ...
2
votes
1answer
68 views

ng-filter by string tokens of input

I have multiple input fields that I am currently filtering a ng-repeat by like so ... <input class="form-control" type="text" ng-model="itemFilter.id" /> <input class="form-control" type="...
0
votes
3answers
242 views

How to display the count of all items on click of a button in AngularJS?

I have say 9 items on a carousel. I want to show the count of individual items below the the carousel images. I have created a Plunker for demonstrating the issue. Plunker Link HTML CODE <...
-2
votes
1answer
73 views

Angularjs ng-bind is not working with regex?

Basically i am trying to style | delimited using Angularjs ng-bind but its not applying styles its adding span tag into string. what will be correct way using AngularJs to achieve this task ? main....
0
votes
0answers
100 views

Angular start session for login system front-end

I am building a small Angular and Node app. I have a form that a user inserts a email, then gets sent to the Node back-end, providing the credentials prove correct a 200 response code is passes to the ...
0
votes
1answer
120 views

How to get total sum of a single column value in ng bind..?

HTML CODE: HERE IS MY HTML CODE WHERE I BINDED SUM OF TOTAL OF EACH COLUMN THROUGH NG BIND.... <tr > <td> Totals </td> ...
0
votes
4answers
897 views

Pass ng-model as parameter to function

Hi I am new at angular and I want to be reuse a function to modify different models. <p ng-bind="f1" ></p> <p ng-bind="f2" ></p> <p ng-bind="f3" ></p> <...
0
votes
0answers
358 views

sweet alert and value from radio

I have a problem with getting value from a radio from a sweet alert. I want to give value from a radio to my HTML page. addTags is a button, radioV is from <p id="radioV"></p> in html. ...
0
votes
2answers
66 views

How do $scope and this techniques differ in terms of sharing data via services?

If you're going to create new code, please don't change the original jsbins I am writing an app in angular 1. Right now I need to create a service I can inject in multiple controllers. I also need ...
-2
votes
1answer
32 views

How exactly are scope variables in angularjs altered?

I am quite new to AngularJS, I want a html file that can dynamically calculate the sum as when I update my variables (say a & b) using AngularJS. Here is my code snippet HTML: Code Snippet for ...
0
votes
3answers
67 views

Ordering table data from separate JSON file by using AngularJS

I'm trying to sort the data in the units section alphabetically from the data that has been fetched from a JSON file. Before, I have tried to create another filter controller for the data, use GroupBy ...
2
votes
1answer
87 views

UI Not Updating even after $scope variable has updated data

I am getting the data for my view through a a service and assigning to the local variable using angular.copy(); var init = function () { $scope.product = angular.copy(EditItemFactory....
1
vote
1answer
348 views

Using nested ng-repeat with dynamic ng-model as object

Okay let me be honest as i am a beginner in angular i am not sure how to frame this question i will try my best to explain this question. Pic 1 : As you see in the above pic i have a situation ...
1
vote
1answer
80 views

Cannot get value of ng-model through $scope

I am trying to get the value of the ng-model when clicking a button which triggers a function to add each ng-model value to an object. When trying to get the value of $scope.shipNameFirst, it comes up ...
0
votes
2answers
844 views

accessing angularjs textbox value in a controller

I am trying to learn AngularJS and require help in passing user entered text box text value after button click to append to a string url value while calling the http service. I'm trying to add in ...
0
votes
1answer
31 views

Updating a form input name value after a $scope.$watch is triggered

I am using AngularJS 1.4. I have a form input element and I'm trying to set the name attribute dynamically. <input type="email" name="{{ctrl.name}}" class="form-control" id="email" ng-minlength="5"...
1
vote
1answer
500 views

Can I use ng-repeat and have isolated scope with angular component?

So I have a ng repeat block that passes an object to a angular component. That looks like this <div ng-repeat="assessor in $ctrl.dedupeDetail.matches"> <assessordedupequickcard assessor="...
1
vote
1answer
159 views

how to set $compile code in html

I compile a string but it's not reflect on dom like. I have some string like : result = '<tr ng-click="someFun()" rowid="hh_'+gameId+'" id="hh_'+gameId+'" ng-class="game.currVideoReplay[' + ...
0
votes
1answer
133 views

Change angular $scope value when different radio button is clicked

I am doing an angular project, I have tried to change scope values and element values by changing radio button. When radio button 1 is clicked I am getting value from server and saving it in scope and ...
0
votes
0answers
59 views

AngularJS controllers mixed up each other

I am building a Single Page Application via AngularJS all of my controllers working just fine one by one but when I put them side by side inside tabs the problem is starting. Firstly here my tabs &...
0
votes
1answer
69 views

I am trying to get all selected values in the list of checkbox using angularjs

**i need to get selected checkbox values in folder array so i have used ng-model. but it seems to be not working. **i need the array in "columnname:"columnvalue" format. but that would be the next ...
2
votes
2answers
889 views

Check if array has a particular index in AngularJs

In AngularJS expressions, how can I check if an array has value in a particular index or not? Consider the following example $scope.arr =['one','two','three']; In HTML. <p ng-show="arr[3]!=''"&...
4
votes
2answers
296 views

How to use angular js's $location.hash to change the color of a html element when clicked?

I have three buttons, labeled About Us, Contact Us and Services. Whenever I click on a button the hash value will be changed and I have used the routing concept to go to different pages. Now, I want ...
1
vote
5answers
2k views

Calculate total price in AngularJS

I'm trying to make this code to get the final number of the sum of all detalle.price elements. They are all numbers so I need to sum them and post the final number on sum(). <div id="pedidos_table"...
1
vote
3answers
71 views

AngularJs ng-repeat custom structure

I have a dataset like this $scope.dataset= [ {"Name":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"}, {"Name":"Ana Trujillo","City":"México D.F.","Country":"Mexico"}, {"Name"...
0
votes
3answers
2k views

How to iterate through angular $scope variables with a for loop

I want to iterate through an array using for loop instead of using foreach in which i m not able to break the loop. But here in for loop i getting $scope.items[i] as undefined! here i m dynamically ...
1
vote
0answers
72 views

Can a directive inherit a ng-click from his parent scope?

I am trying to work with ng-view directive and I want to batter understand the parameters of my scope and controller. my web page has a static part and inside of it the ng-view directive like so: &...
0
votes
3answers
31 views

Angular JS : Error while getting data from typeahead

I am getting error while loading the module for angular JS in my Module, UI bootstrap here is not getting loaded despite of all the dependencies resolved. can any one help me ? Fiddle Link https:/...
0
votes
3answers
233 views

usage of ng-if and ng-switch inside ng-repeat fails

I am trying to compare userId with currentuserId and when the condition of action is approve i am trying to populate checkboxes. But my ng-if seems to be failing always. How can i do this better . ng-...
0
votes
2answers
58 views

unable to retrieve value inside the ng-repeat

I am trying to manually add values to the response that i got from the REST API and use it inside the View . The problem is i am not able to acess the manually added item inside the ng-repeat . Let me ...
1
vote
1answer
56 views

Change in ng-model value getting changed in the other Parts of the list also

I have a view which i am displaying to the user it is a Result list and i'm displaying it on the screen. From view user will be able to click on hyperlink that will allow him to modify that particular ...
0
votes
1answer
81 views

Value of ng-model getting changed when we change value for particular record

I am populating my response from REST API using AngularJS on the front end by using ng-repeat . I'm Providing user with an option to modify each result that is displayed on the screen . When the User ...
0
votes
2answers
46 views

Why does it work with $scope but not with `this`?

I want to know why the following only works with the scripts 1 and 3 and not with the 2. I want to use this because in my project I can't use $scope. Thank you!! <script src="https://ajax....
0
votes
1answer
71 views

not able to execute $http method in angularjs

I m trying to get the data from web-api. While running on a single html page i am getting the response back with the data but if this script is written separately(out side the html page) i am not able ...