Questions tagged as 'angularjs'

1
answer

Error ng-repeat Angularjs

I have the following json object $scope.datos = { "status":200, "data":{ "username":"username1", "nombre": "Diego", "apellido": "Moreno Leon", "telefono": "999999", "celular": "000009901661",...
asked by 09.05.2017 / 18:57
1
answer

Angular Route version

I'm new to this. I am using version 1.6.4 of Angular and I am following a tutorial to implement navigation by routes <script src="bower_components/angular/angular-route.min.js"></script> but apparently this version does not wo...
asked by 18.04.2017 / 04:14
1
answer

if I pass a variable in $ scope to a service, if it is modified in the service, is it not modified in the controller?

Good morning, I am doing this procedure and I have a question, I am passing a series of paramentos to a service, that in the modification I modify those variables that go by parameter, then when entering in the controller, I do not see the ch...
asked by 23.04.2017 / 09:48
1
answer

Replace invalid data

I'm working on an input that can only accept Numbers Letter K (uppercase or lowercase) middle script (-) I have the following regular expression /^[Kk0-9-]+$/ to make only these types of data accepted. What I need is that every...
asked by 21.04.2017 / 17:07
1
answer

length of a json in angularjs

There is some function in angular 1.6 to know the number of records that the json brings, I want to know from my controller, I have used $scope.count = Object.keys($scope.data).length ; but throws me 2, when my json brings 8 records, also...
asked by 21.04.2017 / 00:59
1
answer

doubt with angularjs modules and directives [closed]

I have the following code:    1.- Why use directives ?, in this case it would not be enough to use controller?       2.- Does the controller always have a function with scope? (function() { var modulo=angular.module('tnt.ui.com...
asked by 27.04.2017 / 17:02
1
answer

How to convert data from ng-repeat to variable?

<div ng-repeat="item in students"> <h2>{{item.student_name}}</h2> </div> <div ng-repeat="item in courses| filter:{studen_id: item.student_id}"> <h2>{{item.course_title}}</h2> </div> What...
asked by 08.04.2017 / 20:33
2
answers

How can I show concrete words in different colors in angular js

What I want to do is show the word approved in green and not approved in red. my code is: <div ng-if="data.student_status=='Aprobado'"> <b class="verde" ng-show="{{data.student_status}}"></b> </div> <div ng-if="d...
asked by 04.04.2017 / 09:48
1
answer

How to make an empty .json file that is filled with variable inputs and others (using angularjs)

My problem is this: I try to implement an online test with angular js, I want to use a .json file to store the variables but the problem is that, I want the .json to be empty and to be filled with the inputs of the page, is that possible? Bas...
asked by 02.04.2017 / 01:16
1
answer

ng-init does not work

I have the following: <tr> <td>{{object.valor | number:2}}</td> <td> <input type="number" ng-model="object2.valor" ng-init="object2.valor=object.valor" ng-value="object.valor"/> </t...
asked by 16.03.2017 / 13:35