All Questions
Tagged with angularjs-model angularjs-directive
26 questions
0
votes
1
answer
223
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
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
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 ...
1
vote
0
answers
459
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'...
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
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/...
0
votes
0
answers
123
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
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 ...
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 ...
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
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 ...
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 ...
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(...
1
vote
4
answers
3k
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.
...
0
votes
1
answer
312
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
'...