All Questions
47 questions
0
votes
1
answer
76
views
Convert user input with function and ng-model in AngularJS
Im trying to implement in an app, a unit converter from mm to inches and viceversa. This is part of a larger design app and the idea is that the user can work in mm-inch and use a button to change the ...
1
vote
1
answer
541
views
how to get ng-model value in directive
I have written a directive in AngularJS, and used the input type number with min-max and ng-model attribute. I have used isolated scope. In the directive, I have written a blur event. I am getting min-...
1
vote
1
answer
134
views
Angular Directive access internal ng-model controller
I have a custom wrapper directive for angular-moment-picker. I use cutrom model attribute (dp-model) and an internal ng-model (dpModelObject). I want to access this internal model controller for set ...
1
vote
1
answer
93
views
First ngModel in ngRepeat being assigned with custom directive
I've created a custom directive as a replacement for the <select> element (we have potentially millions of results, so I've split it into pages).
One of the uses for this is to assign a value ...
-1
votes
2
answers
403
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 ...
1
vote
1
answer
2k
views
Angular: Get ng-model by ng-attr-id?
Is there a way to get ng-model value by ng-attr-id ?
I'm making a Comment/Reply box and I would like to get the value of the current reply.
Here is my html--
<div class="comments-list" ng-show="...
0
votes
1
answer
87
views
Using ng-model-options with ngModelController
I am trying to delay validation of an custom textbox component. I only want to validate the input on blur. The existing component does not use ng-model inside the input but uses the ngModelController ...
0
votes
1
answer
2k
views
Change template in angular directive dynamically
I have a controller, that has some variables:
.controller('DataProvider', function($scope, $timeout, $mdSidenav, $mdDialog, $mdMedia, $mdToast, selectedData) {
$scope.provider;
$scope....
0
votes
0
answers
51
views
how can get ng-model value within ng-repeat on directive?
I want's to get the value of ng-model within the the ng-repeat on my own directive and use the value of that ng-model in the directive for a fuction.
here is a plunker to see code in action :
https:/...
0
votes
1
answer
54
views
Angular Datapicker don't pass value through NgModel
i have a page with a form that works as a filter search and one of fields is a date field.
I configured the angular ui date (https://github.com/angular-ui/ui-date) and the calendar works when i ...
1
vote
0
answers
30
views
Should I avoid adding ngModel as one of the attributes to my angular directive?
To properly work with ngModel I have to use ngModelController, but it provides much more flexibility than I need. Most of the time all I need is to have ngModel as yet another = attribute of the ...
1
vote
2
answers
3k
views
Custom validation on Angular Form - on blur
In Angular, I am trying to validate a value of a field on blur. I have a list of customers, and I want to check if the model value in the field is in my list of customers. If not, I want to set the ...
0
votes
1
answer
189
views
Angular nested filters by checkbox
I'm trying to build a small schedule app, which displays events happening on one of two days. Users are currently able to filter the category/topic of the events by checkboxes.
Here is a demo: http://...
1
vote
3
answers
910
views
How to rename ngModel in AngularJS directive "require"
I have this simple AngularJS directive:
<my-directive ng-model="name"></my-directive>
where I would like to change "ng-model" attribute to "model"... but I'm bit lost on how to pass it to ...
5
votes
2
answers
2k
views
Angular - Requiring ngModel and using it in controller of custom directive, not link function
Can anybody tell me if it's possible to require and use ngModel inside the controller of a custom Angular directive. I'm trying to stay away from the link function. I see most examples use the link ...