The ngModel directive binds an input,select, textarea (or custom form control) to a property on the scope using NgModelController, which is created and exposed by this directive.
1
vote
0answers
21 views
Angularjs MV* (MVW) Design Pattern Involving ES6 - AngularJS
I have read these answers by Izhaki and Artem Platonov on Understanding Design Patterns and have some questions about this approach. They might be trivial, but I need some answers.
The final answer ...
0
votes
1answer
33 views
Unable to track and bind to input elements created with ng-repeat
Here's my template, I am dynamically creating input elements to be used in a form. When I submit the form nothing is passed to the update() function designated on the submit element as nothing appears ...
0
votes
2answers
30 views
Angular JS get value of date input with ng-model
I try to get the value of my input date html 5 component by binding it with ng-model like this:
<input type="date" id="dateFin" class="form-control" name="dateFin" ng-model="filtres.dateFin"
...
0
votes
1answer
31 views
Not able to display number of rows in a table based on drop down or input field
I have a table with 'n' number of rows and by default i have set to display 10 rows in each page as the table is a paginated column.
I am now trying to include a text box where user can enter number ...
1
vote
1answer
45 views
AngularJS ngModelOptions updateOn 'submit' validateOn 'default'
Is there any way how to trigger validation when using ngModelOptions? My use-case is to have a form with all fields updating the ngModel on submit (due to the fact that I would like to revert the ...
0
votes
1answer
31 views
Prevent backspace from navigating back in AngularJS Model Window
I am using angular model service ($modal) display pop-up. I am facing a problem like when user click backspace on the model window, parent window gets navigating to previous page. How do i resolve ...
1
vote
1answer
441 views
How to add/remove item to/from list in ionic
I have create tabbed ionic application in VS2015. Now I want to add there simple list with possibility add/remove items (something similar to this - sample of angularjs app)
My HTML code ...
0
votes
1answer
129 views
calling a function from controller inside other controller
I am display a modal where if the user click on delete button I want to call delete() from controller A inside controller B
I am refactoring the Todo App example code at AngularJS website (based on ...
0
votes
1answer
202 views
AngularJS Initialize model directly from view using strongly typed object in asp.net MVC
Is it not possible to use strongly typed objects in asp.net mvc to initialize ng-model properties as currently the view value is getting cleared as soon as ng-model property is getting bind to view.I ...
0
votes
3answers
25 views
Update $scope collection upon closing modal
I'm having the most difficult time trying to find a way to make sure the parent scope's collection is updated with the saved information from a modal.
The parent has a collection of event speakers, ...
0
votes
1answer
42 views
Highlight all inputs that where programatically changed in AngularJS
I have a form with fields that are editable by the user. Some of them, until they are $dirty (edited by the user) will update automatically with suggested values.
I want to mark this change (flash ...
1
vote
2answers
47 views
How to make Angular bind blank inputs to a model?
Here is a simple Angular example:
<!DOCTYPE html>
<html ng-app="GenericFormApp">
<head>
<script ...
0
votes
1answer
22 views
Angularjs update model partially in input value
i've a strange behaviour with a model.
$scope.ev = temp;
<input type="text" class="form-control" id="inputDataFineEv" ng-model="ev.dataOraFineEvento" placeholder="Data fine" ...
0
votes
1answer
132 views
Angular directive multiple inputs one model
HTML:
<html ng-app="app">
<div class="container" style="margin-top: 30px">
<input type="text" ng-model="newName" key-filter/>
<input type="text" ng-model="newName" ...
0
votes
3answers
17 views
Filter a model when there is pagination
My situation right now is that I have a model that loads like 50 car informations.
In the view I have a sidebar with some filters like, year, model, mileage, etc..
When I filter those, everything ...
13
votes
4answers
12k views
AngularJS - how to change the value of ngModel in custom directive?
Lets take a look to my directive:
angular.module('main').directive('datepicker', [
function() {
return {
require: '?ngModel',
link: function(scope, element, attributes, ngModel) {
...
3
votes
2answers
307 views
Parser function does not get called for change in input textbox
I am new to parsers and formatters. I have a directive that will be doing validation on change of the model.One way to do this is the $watch but from what I understand that is not a good way since it ...
1
vote
2answers
46 views
Angularjs model not updated when switching between users at login
I need the following functionality: When a user goes to the login form, the browser should auto fill the username and password.
My implementation works (on FF and Chrome) but, there is this bug (not ...
5
votes
2answers
39k views
Why is Angularjs ng-pattern not working with the following regexp?
For some reason the initialized value doesn't appear in the field, but the second field without the ng-pattern does work. any ideas?
angular.module('app', []).controller('MainCtrl', ...
0
votes
1answer
272 views
Watch a custom directives inner html in angular
I have a global search variable that is used by the whole app
newspaper.controller("MainController", function($scope) {
$scope.search = {query:''};
});
Then I have a contenteditable div that I ...
0
votes
1answer
44 views
Use filter with angularjs controller
I use this code to add a property in the filter when a checkbox is cheked.
<input ng-model="filter['model']['first']" value="first" type="checkbox" name="model">
I tried to do this in the ...
0
votes
0answers
66 views
AngularJS: How do I access $scope objects after being dynamically created
I have created dynamic filters based on the dynamic columns in the table:
using the code below to dynamically generate the binding model:
<div data-ng-repeat="label in bluePrintItems[0].labels" ...
0
votes
1answer
17 views
Why did the model Array here not update in the DOM after updating in the Controller?
http://plnkr.co/edit/7OnKAGvVNXWLwN5fZqJu?p=preview
I'm setting up a question related to infinite scroll and noticed that when I update the $scope.tags array I have once the tags have been scrolled ...
1
vote
2answers
290 views
Changing value of an input date picker with button angular
I have have an input field which is attached an Angular UI datepicker.
Below that, I added 2 buttons to change date, "day by day".
Here is the input part (just after in my page):
<p ...
0
votes
1answer
100 views
Creating model from multiple models in AngularJS
I have this basic fiddle which is a cut down version of what I have on my site.
I was wondering if there is a way to bind the table rows dynamically to a text area to create a ng-model composed of ...
0
votes
2answers
1k views
Referencing the element that is calling a controller function Angularjs ( ng-change / ng-blur / ng-* ? )
The original question asked about how to determine which element called the controllers blurr function, but I didn't clarify that I was not specifically asking about ng-blur, but ng-* (ng-change, ...
12
votes
1answer
1k views
Consider a form invalid while async validator promises are pending
I have an async validator:
app.directive('validateBar', ['$http', function($http) {
function link($scope, $element, $attrs, ngModel) {
ngModel.$asyncValidators.myValidator = ...
0
votes
1answer
103 views
ng-model does not work in select directive
What is working: The ng-options contains all names and it is shown in the dropdown-list.
Problem:
At the beginning if nothing is selected, there should the text "Select name..." displayed. But ...
0
votes
0answers
108 views
Tinymce editor becomes empty when ng-repeat list is reordered
This is a simplified example of a bug we faced in our project recently.
I have a list of objects with "name" and "position" properties and wanna use TinyMCE editor instead of textarea to display ...
7
votes
2answers
128 views
AngularJS orderby doesn't work when orderby-property is edited
I have a list of objects in my scope and want to iterate over them, show some of their properties in ordered-by-some-property way and change them.
ng-repeat is used to display textboxes binded to ...
2
votes
0answers
70 views
CKEditor prevents framework's and native events propagation
I am having an angular directive that is compiled and inserted into CKEditor. Furthermore i have a widget plugin that upcasts those directives to widgets and allows few of their fields for editing. In ...
0
votes
1answer
113 views
AngularJS: Why ng-model scope's variable is not shown in inspector if input field is empty?
I have an input form like this:
<form name="userForm">
<md-input-container>
<label>Username</label>
<input name="username" ng-model="userLogin.username" ...
0
votes
2answers
268 views
Correct approach for angularjs modal transferring data to outer controller?
Im wondering what is the correct approach about software design & best practice for angularjs modals.
In my application I have the main window which is using its own controller, and there I have a ...
0
votes
2answers
502 views
How to pass a directive template model to controller / parent scope
Ugh I'm stuck in one of those Angular binds (no pun intended) where I can't get my controller to talk to my directive.
My directive is the following, a select dropdown with a template:
...
0
votes
1answer
274 views
accessing values from an object model using 'controller as' $scope angularJS
I'm attempting to grab the user.firstName and user.lastName, add a watch collection to those models, and spit back out a userName.
I can't seem to communicate between the two, I think I'm using ...
0
votes
2answers
120 views
Prevent model update before save
I go the list view page click on edit of any element. Change something on textbox and click cancel. This navigates to list view but the entry is now updated even without me saving.
Route
(function ...
1
vote
2answers
77 views
Preserve empty field in model with Angular
If I have an angular form like this
<form name="myForm">
<input type="text" required ng-model="field1" />
<input type="text" ng-model="field2" />
</form>
...
1
vote
4answers
1k views
Pass function from model into directive in AngularJs
I created one directive in Angularjs now binding model data into directive , problem is that I have I am using JqGrid and I want call one function when JqGrid's gridcomplete event will call.
...
2
votes
4answers
225 views
AngularJs - model value does not reflect on ui in nested controllers case
I am using angularjs for one of the my module in application. I want to update UI of various locations on page, so that all ui components will work synchronously as the model value changes.
here is ...
0
votes
1answer
154 views
AngularJS: does the directory structure (e.g. modular programming) influence loading time?
Can modular programming contribute to lower loading time and how?
I read about ways to Modularize AngularJS applications. In general the reason for doing so is to have a good structure when creating ...
4
votes
3answers
441 views
Angularjs updates the view but not the model
please pay attention this is the opposite of 99% of the related questions on stackoverflow.
Mi problem is: I have a dependent select, when the 'Master' select changes, the 'Slave' view gets updated ...
0
votes
2answers
127 views
Binding repeatable form subset to model
On a registration form I allow a user to enter zero or more phone numbers. Each phone number consists of a prefix and a number, these are two fields per phone number. The user may decide how many ...
0
votes
1answer
72 views
Can we update JSON files on the fly in Angularjs?
Angular JS seems to have a problem updating content in .json files on the fly. Specifically I have to restart the server (locally) in order for angular to recognise the new data. This seems to be how ...
0
votes
1answer
160 views
Angularjs-more module dependency issue
I am using more dependency modules for various application.I want to show the ngtable using directive. but this was not working.
sometimes no error, some time i am getting following the error
...
1
vote
2answers
313 views
opening a modal without using a button in angularJS which is accessible to all the controllers
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Standard message modal</h3>
</div>
<div class="modal-body">
...
0
votes
1answer
91 views
Asterisks in input field indicating length with angularjs
I'm using angularjs for a app I'm working on.
I need an input field with a specific length of characters a user has to enter.
To indicate how long the input should be, I would like to have an input ...
0
votes
1answer
350 views
Angular.js ngTable select input as a column not showing the existing value
I'm using Angular.js 1.2 and I'm trying to use a Select input in the cell of an ngTable. The Option list populates but the ngModel directive doesn't seem to select the item for display.
This is what ...
0
votes
1answer
216 views
Referencing the element that's calling a controller function Angularjs
Fairly simple but I can't figure out the term I need to google.
How do I reference whichever element is calling the controllers blurr function?
html
<body ng-app="test">
<div ...
1
vote
1answer
387 views
Why can't I use Angular an angular directive's $set function to set ngPattern, ngMinlength and ngMaxlength?
This is going to sound weird, but, even if it is bad practice or something, how would I get this:
html:
<div ng-controller='CtrlCtrl as ctrlr'>
<input account />
<button ...
0
votes
0answers
70 views
Angular Model with Directives
So I'm getting an error in my template with it not liking the ng-model="event.{{name}}". I was wondering how I can get the model to be ng-model="event.date_end".
I am also wondering if this jquery ...