90 questions
0
votes
0
answers
44
views
Resetting a <select> selection
I'd like to be able to reset the selected <option> in the <select> to the default one (the disabled hidden one).
<select ng-model="question1" ng-options="answer as answer.name for ...
0
votes
1
answer
46
views
How to change the number of rows using a st-template
I've created a st-template that contains specific pagination functionality.
Here is mine the div that calls the st-template:
<div st-pagination="" st-items-by-page="itemsPerPage" st-displayed-...
0
votes
1
answer
226
views
Angular 1 dynamic form object
I'm using Angular 1 and creating a dynamic form. It works by looping through some objects and rendering dynamically binded input fields like:
<div class="quest-form form-group" ng-repeat="task in ...
0
votes
1
answer
81
views
AngularJS , adding 2 extra input text boxes with id and ng-model and they are not getting submitted
I have been modifying a form which I have done many times. This time someone I cannot figure out WHY it is not sending 2 extra fields
Controller
vm.question = {};
Now most of the time they will ...
0
votes
4
answers
1k
views
Updating only the 'view' value using angular directive
So I have a decimal value in controller like this:
// Controller
var MyController = function($scope) {
...
$scope.percentValue = 0.05; // can be stored
...
};
<!-- View -->
<...
0
votes
3
answers
68
views
Why cannot I add new list in a table in angularJS 1.x?
I have example code below where I am supposed to create a list of items.
<div ng-hide="listTrigger">
<!--FIRST TABLE-->
<table class="table ...
0
votes
1
answer
841
views
How to refresh data in angularjs kendo-multi-select
I am new to angularjs. i am using kendo multiselect i am adding data by default when loading the view. and i have one save button when click that button i am calling Success method inside that method. ...
0
votes
3
answers
868
views
angularjs not updating model value
In my example I want to update model when user focus the textfield. In short append 'px' string to the existing value.
HTML:
<div ng-app>
<div ng-controller="PixelCtrl">
<div>
...
0
votes
1
answer
2k
views
AngularJS input mask with validation
I have a directive which has a mask and validation for an input control. It's basically a time input where the user can input something like 45 (45 mins) or 2.5 (2.5 hours => 150 minutes). The input ...
0
votes
3
answers
523
views
How to access the modalInstance $scope from outside the model
I want to update some value of a $modal in AngularJS but unable to understand how I can do this. Sample code is below:
var modalInstance;
function setupCall(data) {
var templateURL = '...
1
vote
0
answers
460
views
What is the difference between scope and model within a directive definition in AngularJS
I was wondering about the difference between scope and model within a directive.
The following 2 directives behave exactly the same:
angular.module( 'exampleApp', [] )
.directive( 'exampleDirective1'...
0
votes
0
answers
276
views
First option in the dropdown is not getting selected in an Angular app
I have following dropdown in the html template.
<div class="row">
<label class="text-label hint--top-right hint--large" data-hint="{{customer.config.METHOD.DESCRIPTION}}">...
1
vote
1
answer
3k
views
passing value from parent directive to child directive's template function
I'm trying to access value that is passed from the parent's directive on the child directive's template function.
Please refer to the below plunker.
Plunker Link
CODE:
Parent Directive:
directive(...
0
votes
0
answers
908
views
Passing array with ng-model
I'm having a problem getting the values from multiple input fields, into a single string. The way I am currently trying to do it is to make each input field an index in the array.
I made an array, ...
0
votes
1
answer
76
views
Why can't I bind the initiated application variable's value to the HTML input control using 'ng-bind'?
I'm a newbie to this thing called 'AngularJS' so I got stuck at one point.
Consider the below code sample :
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/...
1
vote
1
answer
65
views
AngularJS mantain state when changing views?
Is there a way to maintain $scope when changing views and coming back?
When i load a certain view there is some heavy loading (loading data), but if i switch views and comeback to this one al the ...
0
votes
0
answers
128
views
Angular nested directives scope not shared
I have my input directive which takes the input value from html, and updates the angular model:
.directive('input', function($parse) {
return {
restrict: 'E',
require: '?ngModel',
link: ...
0
votes
1
answer
58
views
AngularJS - Using Model in Controller causing Model to update
I have an Angular application where in I'm pulling from a model some data which is saved on the load of the app. For simplicity sake, I've explicitly defined the data which is being pulled.
The issue ...
0
votes
1
answer
87
views
How do I make sure that each instance of my angular model has certain characteristics?
I have some tasks to do . I want to make sure that each task has a maximumFundPossible property of $1000 constant, a currentfund property that is variable as it will be updated as tasks are being ...
0
votes
1
answer
1k
views
Angular.js values not being saved in the scope from textbox
I have this html markup:
<div data-ng-controller="VehicleProfileController">
<modal title="Add Vehicle Info" visible="showVehicleInfo">
<div class="container">
<div ...
1
vote
0
answers
249
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
1
answer
356
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 ...
1
vote
2
answers
1k
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
1
answer
207
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 ...
0
votes
1
answer
571
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 ...
0
votes
1
answer
2k
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
3
answers
418
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
1
answer
1k
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 ...
3
votes
1
answer
1k
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 ...
1
vote
2
answers
940
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 src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js">&...
0
votes
1
answer
70
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" value="{{ev....
2
votes
1
answer
21k
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 (tab-chats....
1
vote
1
answer
3k
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" key-filter/...
0
votes
3
answers
39
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 ...
0
votes
1
answer
2k
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
1
answer
52
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 ...
1
vote
2
answers
501
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 ...
0
votes
1
answer
38
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 ...
0
votes
1
answer
1k
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 ...
1
vote
2
answers
3k
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 class="input-...
2
votes
1
answer
1k
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 it's ...
0
votes
0
answers
814
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
2
answers
898
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 ...
0
votes
2
answers
748
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 ...
2
votes
0
answers
128
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
1
answer
366
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
2
answers
690
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 ...
1
vote
2
answers
3k
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:
app.directive(...
0
votes
1
answer
1k
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
3
answers
1k
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 ()...