new

Stack Overflow for Teams

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

Learn more
-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
0answers
30 views

Angular JS dynamic model in directive [duplicate]

It can be hard to explain, but will try: I have a directive which consists of textbox + button, and updating scope variable (dynamically or by button click). Directive has two parameters: scope: { ...
0
votes
1answer
443 views

How to make ng-model work with ng-value?

I have this input: <input type="number" id="totWeight" ng-model="totWeight" ng-value="getTotWeight()" /> which value is calculated based on other fields, but it can also be inserted manually ...
-1
votes
2answers
99 views

ng-model-binding not updating when changed

[ng-repeat is used to form this table] Want to do following tasks : Step1- input in PromoPriceTxt3 text box should reflect in other text boxes below it too. i.e PromoPriceTxt4 Step2- The change in ...
0
votes
2answers
1k views

Add/Remove class if checkbox is checked/unchecked (AngularJS)

I need to toggle a class if a checkbox is checked/unchecked with AngularJS. My Code is working on Plunker but in my controller there is no functionality. Here is the Plunker: Click! My Controller ...
1
vote
0answers
308 views

AngularJS 1.5 component get parent ngModel

I can't change ngModel defined in $ctrl. It looks like this: 1. I have next code, defining component in index.html: <div ng-controller="appControllerData"> ... <div ng-controller="...
-1
votes
1answer
217 views

AngularJS Form and $scope not updating each other

I am trying to make a very minimalistic form in AngularJS (version 1). I am trying to use ng-model and the $scope to update an object I've named fluff. Once a user clicks submit it should be used in ...
0
votes
0answers
30 views

Weird behavior with this and $scope in controller method

Well, I am new to angular and my prior searches showed me that using 'this' is different from '$scope', inside a controller. Bearing that in mind, I decided to only use scope in my application, which ...
0
votes
2answers
423 views

auto generate download link with angularjs

i generate my download link from this script https://github.com/joshpangell/single-use for example: download url generated like this: http://cloud.joshpangell.com/singleuse/download.php?key=...
0
votes
1answer
74 views

ng-model not updating input properly

I have this same function on another page and it works beautifully, but for the life of me can't figure out why its not working in a 2nd implemenation: If the userPhone input starts out blank, and I ...
0
votes
0answers
44 views

ng-model not scope data with ctrl

I need to send form with post method to url. All ng-select field work, but only one input field not. Here is code. I add ctrl to ui-state like all other ctrl. > https://plnkr.co/edit/...
0
votes
0answers
55 views

Acces ng-model in ng-repeat

First sorry for my English. I have two arrays but the important is array bloques: bloques[estado:"", fecha:"",idbloque:"" idbloquec:""materia:""] and bloques have arround 30 elements I have the ...
0
votes
2answers
72 views

return value the ng-model of a select within the repeat

I problem return value ng-model="selectStates" of a select within the repeat! Where this commented, was another attempt. <div ng-controller="coursesCtrl"> <form name="formFilters" id="...
2
votes
5answers
386 views

Initializing all ng-model from controller on load Angularjs

I am stuck into a problem where I am suppose to get all the ng-models which are declared as ng-model="a['keyX'] and initialize them to 0 before the user starts giving inputs.. Due to some reasons I ...
0
votes
2answers
333 views

Apply $scope ng-click event to hidden element after it is displayed

Please ask me for better explanation. I have built a global search function into the header of my site. I want to display a separate input box for mobile search that uses the same ng-click event but ...
0
votes
1answer
519 views

AngularJS How to dynamically get the ng-model value of inputs in a form or whatever

I have a form containing inputs with a ng-model defined for each of them : <form> <input type="date" ng-model="dateFilterInput" id="dateFilter" class="..."> <select class="..." id="...
0
votes
1answer
62 views

Download button not responding to ng-disabled in angularjs

I have a webpage which displays contents of a folder/directory upon clicking on it. If the contents of a folder has files, then download button is activated. If the contents of the folder is a ...
0
votes
4answers
861 views

Empty the placeholder when using ng-model

I'd like to create a text input linking it to a variable in the Scope. But I don't want the placeholder display anything. However the content of this variable in scope continues to shows. Why? ...
2
votes
4answers
2k views

Update HTML input value changes in angular ng-model

I have some ng-model input elements that gets updated non-angularJS functions like jquery or sometimes by pure javascript DOM apis. The value on the html input element changes however the model scope ...
1
vote
1answer
974 views

Cannot get form data with ng-model

So I have two forms inside the same controller. <form name="myForm" id="myForm" class="form-horizontal" ng-submit="saveMyForm(myForm)" > <input type="text" id="name" ng-model="name" />...
3
votes
2answers
108 views

Angular JS emptying form input field from controller when using ng-model

I have a really simple form with a couple of input fields. Here's one: <label class="item item-input item-stacked-label"> <span class="input-label">First Name&...
3
votes
1answer
2k views

What's the point of $validators and $setValidity?

I think I'm missing something with $validators and $setValidity (which I understand, do the exact same thing so you don't need both - please correct me if I'm wrong). Whether I have the $validators ...
1
vote
2answers
157 views

How to calculate row total when using ng-repeat?

I'm trying to create a tracker using AngularJS and I'm having a bit of trouble with my logic when it comes to ng-repeat. Here's what my table looks like to help explain what I'm trying to do: So ...
5
votes
1answer
4k views

Angular - Get data into ng-Model from object in controller

I am not able to put the data into ng-model in view from an object in controller. VIEW1 : <input type="text" class="user-input" name="profile.firstname" ng-model="profile.firstname" ng-minlength="...
0
votes
2answers
2k views

AngularJS - passing selected item data to an edit form

I'm doing an add/edit form in angularJS. I have a template to display the list of items and another one which contains a form. If I want to add an item then it works but I'm having issues with ...
3
votes
1answer
513 views

In AngularJS can I use the ng-model and the ng-bind only in the view without involving the use of a controller?

I am pretty new to AngularJS and I found this example related to the ng-model and ng-bind directives: <!DOCTYPE html> <%@ page language="java" contentType="text/html; charset=UTF-8" ...
0
votes
0answers
61 views

Angular-ui-router sharing scope

I'm using angular-ui-router lib, which is great, but i've a problem with sharing scope when state changes. The main idea is, once you get the product data making HTTP GET request, render the form ...
0
votes
1answer
125 views

Form is data-binded to a ng-model inside ng-repeat… but all repeated values are changed?

I am making a simple web app that allows users to select food items and customize their order (drink, sides and toppings). The approach I am taking is for each food item to have the following ...
1
vote
2answers
1k views

multi select check box with ng-model angular js

I have the below controller setup so that I can add the checked values into an array as shown below. (function (app) { 'use strict'; app.controller('SimpleArrayCtrl', ['$scope', ...
0
votes
2answers
52 views

How to show data from the $scope in Angular?

I'm trying to bring data from my angular controller to my HTML view. This is the data that I've passed in the $scope. I know how to show objects using ng-repeat. But how can I show the data that is ...
1
vote
1answer
535 views

Use ng-model in nested Angularjs controller

I have two nested controller in angularjs, and want to use ng-model from outer in inner controller. Suppose this <div ng-controller='outController'> // data.Name : from outer controller ...
1
vote
1answer
299 views

$watch is not working in Modal even though using like $scope.user={pwd1:''}

Please refer my Plunker link : http://plnkr.co/edit/0vOjw0?p=preview index.html <!DOCTYPE html> <html ng-app="app"> <head> <link rel="stylesheet" href="style.css"> ...
0
votes
1answer
1k views

How to use angular ng-repeat with ng-grid and ng-click?

I am having a problem populating a table using ng-repeat after a cellTemplate ng-click. cellTemplate: '<div ng-click="foo()" ng-bind="row.getProperty(col.field)"></div>' In this foo ...
0
votes
0answers
27 views

AngularJS Form ng-model More then 1 value [duplicate]

I'm making a multistep form and on the first step I have a list of cars with their picture and some radio inputs to select one. On this radio I have a ng-model and the value is the name of the car. ...
1
vote
1answer
49 views

What is the issue with the following code/practice in Angular?

In my Angular Controller, I use the following... $scope.selectedAll = { all: false}; Later in the template, it is bound like so... <input type="checkbox" ng-model="selectedAll.all" ng-...
0
votes
1answer
72 views

Specifying Angular ngModel Value with ng-repeated options

I've got a select dropdown, whose options are being ng-repeated out of an object called $scope.bars. However, my ng-model, which is set to a sub-value of $scope.bars, is not correctly choosing an ...
1
vote
1answer
519 views

multiple forms ng-repeat - posting back the current $scope only, not whole object

I have multiple forms using ng-repeat. <div ng-repeat="individual in orderDetails track by $index"> <form ng-submit="saveDetails();"> <input ng-model="individual.order....
4
votes
2answers
3k views

Angular - how to pass ng-model from ng-repeat to a function and to scope

I have the following code: <form ng-submit="addRow($index)"> <input type="text" ng-repeat="column in table.columns" ng-model="column"> <input type="submit" value="add row"> &...
0
votes
1answer
188 views

Access html element via ngModel

Imagine something like this: <input type='text' ng-model="x"> Now, using x in the controller, how can I change this element? let's say I want to change its class. Or add a random element ...
2
votes
2answers
9k views

Ionic / Angular JS - $scope issue : Cannot read property 'length' of undefined

I can't use $scope in ionic, it seems that's $scope is not working. Let's see very simple example : App.js : angular.module('TestApp', ['ionic','TestCtrl']) .run(function($ionicPlatform) { $...
0
votes
2answers
73 views

Finding the SUM of PHP-looped elements + ng-modeling

I've created a table with a row for each day of the month. Each row has a few input fields for numbers. When someone types in a number, it shows it in within element to the right of it. I've used a ...
1
vote
4answers
2k views

Two inputs with one way binding in ng-model

I try to make an application which have two inputs text (say parent and child) , each one has ng-model . I want to make it one way binding , mean , change in the parent input should display the same ...
0
votes
1answer
814 views

How dynamically add new input element if all others was filled in AngularJS

please watch this Plunker So I working with angular and need to add new input field when all others are filled in (by default on page placed 5 inputs and if all of them are filled automatically add ...
0
votes
1answer
1k views

AngularJS $scope values from ng-model lost from page to page in same controller - Ionic Framework

I have this page which links the input.countNum scope variable to the input with ng-model. The value which is displayed on the button shows fine. When you click the button on the first page, it ...
4
votes
1answer
2k views

pass the ng-model value to angular directive

I have a scenario where I have certain number of text-boxes and when I click on any of the text-box, its corresponding ng-model is to be printed on the browser console. I have written the following ...
0
votes
1answer
610 views

Why is my Angular scope variable undefined?

I have a quotes array which contains 6 quotes. Next I have a getRandomNum function which returns a number between 0 and 6. To be used in my chooseQuote function: <body ng-app="myApp" ng-...
1
vote
1answer
990 views

Angular using ng-bind-html and ng-model together in select dropdown?

Is it possible to use ng-bind-html and ng-model together on the same select dropdown? In my application I have a select dropdown that gets populated with ng-bind-html (which is working fine) but when ...
0
votes
0answers
205 views

AngularJs. Set value to model in isolate scope

How can I pass a value from a select ng-model, which is created using the form.widget of the Symfony framework in the model, which is defined using the directive? Template code: <select name="...
0
votes
1answer
42 views

Angular is not setting the text from input to the model I assigned

I have a JSON object with some keys and values. I want the user to be able to define what the values should be, so I generate some input boxes from the JSON object, using ng-repeat. <div ng-...
0
votes
1answer
523 views

Why does my nested directive disconnect from its ngModel as soon as $setViewValue() is called?

Plunker here. I have a directive ("child") nested inside another directive ("parent"). It requires ngModel, and ngModelCtrl.$modelValue is shown and kept up-to-date just fine in its template. That is,...