Tagged Questions
0
votes
2answers
34 views
AngularJS ng-model value is lost after custom validation directive is triggered
I created a custom validation directive and used it in a form. It can be triggered with no problem, but after the validation is triggered, I found that the model value is just lost. Say I have
...
0
votes
2answers
55 views
Why is the binding not working for $scope in controller?
I'm new to Angular.
I am having problems dealing with variables back and forth between my controller and html.
In my controller not only I want to read $scope, but I also want to use it in a function ...
0
votes
3answers
41 views
Initialize ng-model string with function
Is there a way to conditionally initialize ng-model to a certain string with a function? In the following, ng-bind works, but ng-model doesn't:
var app = angular.module('app', []);
...
1
vote
1answer
155 views
Angular.js - ng-model overwrite my ng-value on text-input
I'll start off with mentioning I'm very new to Angular so I'm probably not doing things in the correct "Angular way".
I have the following ng-repeat looping through some data - the correct data is ...
0
votes
0answers
68 views
value changed in ng-model in templatedUrl is undefined in directive
initially when i load it works fine but when i change the value in template URl for ng-model scope.value is undefined inside my link. i am making directive for datepicker bootstrap angularjs.
...
0
votes
1answer
76 views
Angularjs bind ng-model dynamically to an value
i want change the reference for the ng-model value dynamically. i can do this for example like that:
$scope.test = {
normalStringValue1 : [],
normalStringValue2 : []
}
if($scope.status == 'A') {
...
1
vote
2answers
73 views
Why ngModel is not updating the value for the first time?
Why ng-Model value is not showing the updated value
Please check my code below
JS
$scope.test='xx';
$scope.testfunc=function (a) {
alert(a);
}
HTML
<input type="radio" ng-model="test" ...
1
vote
2answers
98 views
How to store the value of model in a variable?
I am creating a directive, in which i want to compare the value stored in a model (say "name" as model and it is having value "Angular")
to be stored in a variable.
I tried something like below,
var ...
1
vote
2answers
46 views
Why doesn't my Angular ngModel example throw an error?
I have read several SO responses regarding Angular $scope and how it's a plain old JavaScript object, which means that it'll follow JS's prototypal inheritance (What are the nuances of scope ...
0
votes
1answer
60 views
Angularjs Select initial value for selectbox inside ng-repeat
I want to populate the selected color as selected option in selectbox in initially
link of jsfiddle
here is my partial :
<div ng-app ng-controller="QuestionController">
<ul ...
0
votes
1answer
224 views
How to Watch Directive's Directive ng-model
I have a directive that uses the parent scope in that view. This directive has a child directive that uses an isolated scope. I am trying to get the parent directive to watch any changes done to the ...
1
vote
0answers
337 views
AngularJS - ngrepeat form input elements dynamically filled with default values to post
http://jsfiddle.net/9sCnC/12/#
I'm going through a json file and parsing it through ng-repeat, a button on each item opening a modal window.
In this window a form is generated with data I would like ...
0
votes
2answers
53 views
scope of ng-model in angular
Here's the html part...
<body ng-controller="homeController">
<div id="happyValentines" ng-model="myText"> {{ myText }}
I don't get why this works...
$scope.myText = "fksdm kdsmfk ...