new

Stack Overflow for Teams

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

Learn more
0
votes
0answers
51 views

Few $scope variable values are undefined

I have a add route form. I am able to get distance, description $scope values from view to controller, but for one field terminal stop which is auto generated value before submitting form is undefined ...
0
votes
1answer
302 views

AngularJS 1.x Display one item at a time in ng-repeat, click on next should display next item and so on

I am developing a quiz web application, where I have to show 100 question in total across 3 different tabs (Math, GK, English), the questions are getting filtered using angular filter. But each tabs ...
1
vote
1answer
71 views

Adding Form Fields Dynamically in angularjs not working

I am developing an online course application. I am trying to add form fields dynamically in my application, so that I can add more video lecture for a course. However, when I click on "Add Another URL"...
0
votes
1answer
37 views

How do I separate the json objects in a get http request in a $scope?

[{ "entityList": [ { "scenarioNo": "SC1", "accountingMonExtracted": null, "acronym": null, "address1": "542 W 27th Street 4th Floor", "address2": null, "...
0
votes
3answers
483 views

AngularJS: How to bind ng-model to an 2 dimensional array

I am newbie in AngularJs. I would like to create multidimensional array element in ng-model as defined below. <Ojbect> <Array> <Element1> <var1> ...
0
votes
1answer
32 views

How to put the heading as the first binding and content below that while heading alone have mark

<li class="checked-list" ng-repeat="detail in ctrl.details">Your details are <strong ng-bind="detail.Id"></strong>. <br/> <span ng-bind="detail.description"></...
1
vote
0answers
405 views

getting duplicate values separated by comma in drop down

I am working on angularJS and node.js application and got stuck on this silly bug. I am trying for few hours, but it is still giving me a headache. I will thank ful if any of you have a solution or ...
0
votes
4answers
68 views

Can I use ng-repeat items by two each time in angularJS v1?

So I'm having quite a bit a trouble putting two array items inside a div tag using ng-repeat. Tried a few things, but can't figure it out. Below you can see the layout I'm trying to achieve... Any ...
0
votes
1answer
79 views

Behavior with ng-show and ng-hide in angular

This is my code: html: <div ng-controller="ButtonController"> <button class=" circle-white btn btn-collapse-custom" ng-click="collapse(1); toggleBtn()"> <i ng-show="imgbtn" ...
0
votes
2answers
247 views

Can I set a scope property from a directive's link function?

I'm making a directive containing a canvas and I'm having trouble accessing it in all the places I need to. I'm currently setting up the canvas in the directive's link and drawing some initial ...
4
votes
2answers
4k views

ngFocus not working in AngularJS

Following is my code snippet in which I need to focus an input field on the basis of checkbox value, If I check the checkbox it should focus the second element which somehow not working. Let me know ...
0
votes
0answers
58 views

Angualr js How to handle http error globaly

HI all i have 2 question angular try to handle server $http error globally. so written below code in app.js angular.module('mname',[]) .config(function ($provide, $httpProvider) { $provide.factory(...
1
vote
1answer
56 views

has-error with ngClass on load even the expression is false it loads the class

Trying to load boot strap has-error class using ng-class with condition on a variable injected to controller from my factory ,though the initial value of variable is false , the has-error loads up ...
1
vote
1answer
54 views

Save and Next in Angular JS with Modal Window Instance

Im quite new to Angular JS and building a CMS system using it. Currently we have 30 - 40 Objects. Which we load into a list. When one is clicked this loads a Modal Window using the Modal Instance in ...
2
votes
1answer
460 views

Angular js get $valid value for elements in form tag seperated by div

I need to be able to get $valid value of the elements that are seperated by two div tags here is a code pen with the set up . http://codepen.io/anon/pen/RWVgyr?editors=101 <form name='form' ng-...
1
vote
2answers
810 views

Want to upload file locally with html and angularjs

I've html page which uploads the file. As of now, I want to store it locally. I'm using angularjs for this. I've gone through many solutions but didn't work. This is my html file: <body> &...
0
votes
1answer
99 views

AngularJS 1.3 Migration Not Working

I have updated my script code to the following after reading about documentation on migrating from 1.2 to 1.3. var app = angular.module("APP", []); app.controller('Ctrl', function ($scope) { $...
5
votes
3answers
479 views

Not able to get value of radio select setting dynmically in AngularJS

Following is my code in which I am not getting selected radio option for each corresponding rows, let me know what I am doing wrong here. My Plnkr Code - http://plnkr.co/edit/MNLOxKqrlN5ccaUs5gpT?p=...
0
votes
1answer
279 views

Angular timeout is not Working

I have tried below code on different ways using angualrjs.but there is no reflection on connection timeout in request header as well as application flow.i have went through many angular js sites. but ...
1
vote
0answers
284 views

Client Side Timeout is not working in Angular js

I am developing an angular js application, In which I am implementing some logic to timeout for a http service.Below is the code snippet on which i am working :- var wkUrl = "api/" + 'Customers'; //...
1
vote
0answers
56 views

Sporadic value updates in html

I have an AngularJs decorator directive that adds functionality to an html5 video player. I am trying to get the speed (playbackRate) to display in html when the speed is increased using the (l/r) ...
3
votes
1answer
1k views

How to show Sublevel Array Using table element with AngularJS

I am beginner in AngularJS. My Question is how to show Parent/Sub level Array Records in table format with expand/collapse functionality (child row should be displayed on expanding the parent row) ...
0
votes
3answers
1k views

Find object by id using another object's id property from array of objects with ng-repeat

I have the below data model in my scope. $scope.staff = [ {"id": "1","name": "Alex"}, {"id": "2","name": "Brad"}, {"id": "3","name": "Cam"} ]; $scope....
0
votes
1answer
366 views

AngularJS use factory to calculate changes to object

I want to make a simple pay calculator so that you have a list of staff and their current rate and hours and you can manipulate the rate and the hours to work out which staff will cost the most. I ...
0
votes
1answer
326 views

Angular module only works with inline javascript

I am learning Angular and adding a controller to my module only works when all the code is inline on the page. If I replace it with <script src="myModuleFile.js"></script> it fails with ...
0
votes
1answer
2k views

pass variable into html view angularjs

I have this code in my angular js controller . angular.module('IpadAppApp') .controller('Mortgage_LoanCtrl', function ($location, $scope, $http, $modal, $sce) { var host = 'http://localhost:...
2
votes
4answers
890 views

Why does innerHTML returns undefined in angularjs

innerHTML returning undefined when <p></p> tag is clicked, but i am expecting its inside html. Any guess why? http://plnkr.co/edit/NOLTO95H5GDuG35X9NOA?p=preview
-1
votes
1answer
54 views

AngularJS: data is being updated in controller but it is not shown in the HTML

In my AngularJS application, I have the following code: example.html <div> <p>{{name}}</p> </div> <div> <button ng-click="...
3
votes
1answer
247 views

Angular.js “controller as” Syntax suddenly stop working on Chrome v. 39.0.2171.95 m

We're developing a WebApp on Angular.js v. 1.3 and Node.js v 10.2x and we use ng-controller="MainController as main" and some others, but it's always the same Syntax. We have an initialization in ...
5
votes
1answer
9k views

Pass in a function (by reference) a variable in the scope

There is a way (in angularJS) to pass by reference a variable in the scope in a function (to modify it)? I've tried but the variable change doesn't happen. Here my code $scope.modifyVar = function (...
0
votes
1answer
53 views

angularjs restricting count to current scope

I am tring to setup a counter where for each country in my list I can keep count of how many clicks there has been plus an overall tally. I have the below so far which can be viewd in this fiddle. ...
1
vote
1answer
25 views

Filtered search return duplicates after the first search

In my angularJS web-app I've this piece of code where I show some names (forming part of the array SearchRcps) filtered by a searchString inserted in an input search bar. I do this $index%4==0 to ...
0
votes
0answers
480 views

Express/Nodejs - Why does the ejs renderFile function need to be included in my engine setup If i am only using plain html and no ejs?

here is the code snippet for my view engine setup //view engine setup app.set('views', path.join(__dirname, 'views')); app.engine('html', require('ejs').renderFile); app.set('view engine', 'html'); ...
0
votes
1answer
999 views

Node/AngularJS - TypeError: Cannot read property '_id' of undefined.

I am new to the MEAN and i am trying to make a simple CRUD application. I am getting an error of undefined on my _id and i do not understand why. This variable works withevery other function I call it ...
1
vote
0answers
42 views

How to share data in between two controllers using angular JS?

I am new to angular JS and Javascript. I am working on a angularJS project and In project i am using several modules like Secreport -> secreportpage -> secchart. I passed data from mainCtrl to ...
0
votes
0answers
467 views

Understanding ng-model for Select options

My controller: $scope.taglist = [{"name":"Fruit_Type","value":"0"}, {"name":"Leaves_Arrangment","value":"?"}, {"na‌​me":"Leaves_Margin","value":"?"}, ...
1
vote
1answer
70 views

Keeping a views state

I have an app that filters out objects from a DB based on a simple form with select options, with each change in the form I get a list from the server with the filtered objects. When the list ...
0
votes
1answer
536 views

Cannot set property 'var' of undefined at method

I'm doing something really simple here but getting an error saying TypeError: Cannot set property 'question' of undefined at setQuestion and I cannot figure out what's causing it. I'm new to ...
0
votes
1answer
735 views

Cannot read property '$on' of undefined

Trying to use events in AngularJS but getting the error stated in the title. Followed this example which seems pretty straight forward so not really sure about what might be causing the error. My ...
0
votes
1answer
2k views

Angular - update badge number in template

This is my controller: .controller('FilterCtrl', function($scope, $http, tagsService, speciesService) { $scope.tags = tagsService.getTags(); $scope.fileNameChanged = function(event) { ...
1
vote
1answer
79 views

Creating Dynamic ng-model in AngularJS

Following is the working code - http://plnkr.co/edit/6lRhiTd1BrKRdThY0WNB?p=preview In this if you select the number from drop down and fill data then click and check console you will see the result ...
1
vote
1answer
84 views

Select in Angular JS - I need the element and value attribute to be the same

I have a json like this, stored in $scope.result: { "tips":["p1","p2","p3","p4"],"actualTip":"p4"} And I need to do a comboBox with Angular. I did this: <select class="form-control" id="one" ng-...
0
votes
2answers
446 views

onDblclick of a directive: toggle its boolean attribute value

I have a directive called contentEditable which is also referencing the html5 attr ::docs::. <p contentEditable="{{edit}}" ng-model="pages.title">default</p> on dblclick of directive, I ...
0
votes
1answer
1k views

how to display barcode scan result on html instead of an alert in angularjs + Ionic

Hi I am working one of my project Inventory management, where user scan the any product barcode and get the value and use it. I have successfully achieved that using following code: .controller('...
1
vote
1answer
50 views

Difference between ways to declare a scope in a directive (ways shown inside)

I'm new to AngularJS, JavaScript and HTML. My question is: ¿What is the difference between the four ways to declare the scope in a directive? I'm going to show the way and then write what I think ...
0
votes
0answers
45 views

Angular Template does not call the <script>. Anyway around?

I want to call different script based on different template. It will be heavy to load all of the script in the index page. However, Angular Template does not execute tag. How should I go about ...
1
vote
1answer
919 views

binding variables to compiled elements in angular Js

I am dynamically creating an element with angular. When the app initally runs using app.run() the element is created and I compile the element, after compiling the element I add an ng-show="active" ...
27
votes
4answers
32k views

How can I use HTML5 geolocation in angularjs

How can I use HTML5 geolocation in angularjs? I can get it using HTML5; but how can I pass it to angularjs scope in controller? any sample jsfiddle will save my day!
0
votes
1answer
2k views

How to pass ng-model value to anchor tag which opens an HTML overlay?

I have a scenario where I display many posts on a HTML page using AngularJS and every post, when clicked, shows associated data in an overlay. Data is displayed on main page using ng-repeat tag and ...
0
votes
1answer
260 views

Passing data between controllers using service and confusion with using [ '$scope' , 'service' , function($scope, service){}]

I am badly stuck with this problem of passing data from one controller to other in angularJS. Before my code was: whenever I click on templateController's div, it would trigger setTemplate with the ...