Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <form ng-submit="registrar()" >
  2. <div class="form-group col-sm-1">
  3. <label for="ID">ID</label>
  4. <input type="text" class="form-control" ng-model="IDObra" >
  5. </div>
  6. <div class="form-group col-sm-2">
  7. <label for="Recurso">Recurso</label>
  8. <select ng-model="recurso" class="form-control" name="recurso">
  9. <option ng-value="Municipal" >Municipal</option>
  10. <option id="dos" ng-value="Estatal">Estatal</option>
  11. <option id="dos"ng-value="Federal">Federal</option>
  12. </select>
  13. </div>
  14. <div class="form-group col-sm-2" >
  15. <label for="numObra">No. Obra </label>
  16. <input type="text" class="form-control" ng-if="recurso == 'Municipal'" ng-model="numObra" ng-init="value='{{numero}}'">
  17. </div>
  18.  
  19. var empleadoControllers = angular.module('empleadoControllers', []);
  20.  
  21. empleadoControllers.controller('EmpleadoListadoCtrl', ['$scope','$http', function ($scope, $http) {
  22. numero();
  23. empleados();
  24. profesiones();
  25.  
  26.  
  27. function numero(){
  28. $http.get('http://localhost:8888/base2/api/?a=numero').then(function(r){
  29. $scope.numero = r.data;
  30. });
  31. }
  32. function empleados(){
  33. $http.get('http://localhost:8888/base2/api/?a=listar').then(function(r){
  34. $scope.model = r.data;
  35. });
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement