How to make a $ watch to a variable created from an instance of my controller using the controllerAs notation for example
var vm = this;
vm.myVariable = [];
$scope.$watch('vm.myVariable',function(newValue){
console.log(newValue);
});
I...
The first time I use AngularJS with the Google Maps API, the point is to use a .directive to show the google map.
app.directive("myMaps",function(){
return{
restrict:'E',
template:'<div></div>',
replace:true,
scop...
Good!
I would like to do a test with a code in JsFiddle with Angular. Esoty trying it putting the link in "External resources" but there is no way to take it. Can someone tell me how is the correct way to do it or tell me the link to a tutori...
I have the following select:
<span>Primer aspecto critico <span class="text-danger">*</span></span>
<oi-select
oi-options="x.id as (x.pregunta.nombre ) for x in preguntas track by x.id"
ng-model="informe.aspCrit...
I want to do, that when I login, launch another component
about.html
</head>
<body ng-controller="MainCtrl">
<h3>Login</h3>
<!-- Form to get username & Password -->
<form>...
What I want is that when I select a department, the municipalities appear to me, and when I select municipalities, the zones appear in that municipality, try this, everything works except the last loop that is the zone:
<d...
I currently have a token authorization with the JWTAuth library, this generates the token correctly when my credentials are correct.
The problem arises when I try to send the token from AngularJS, the method is done in the following way:
va...
I have two checkboxes, if one is selected, he brings me the men and if I select the other he brings me the women, but I want an option where I can select the two and bring me both. I want to do that with other fields.
<body>
<div...
Currently I work the insertions and deletions of registration with ajax in the following way:
1.- I consult all the records that I have and I keep them in $scope.data .
2.- Insert record in base de datos and execute step 1....
I have the following structure as I come to the table below it is important that all be td
p:{
0 :{
s:{
0 :{fruta:"manzana"}
1 :{fruta:"pera"}
}
}
1: {
s: {
0 :{fruta:"mango"}...