Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/06/2016, 11:36
gsoto78
 
Fecha de Ingreso: septiembre-2008
Mensajes: 20
Antigüedad: 15 años, 6 meses
Puntos: 0
Modal con checkbox con angularjs

Hola buen dia al foro
Espero que me puedan orientar tengo un problema con una modal que adentro de la modal tiene checkboxs que manda llamar a a documentos en pdf el problema que no me funciona no se si el botton o en que estare mal este es el codigo

<div class="inmodal">
<div class="modal-header">
<i class="fa fa-laptop modal-icon"></i>
<h4 class="modal-title">PDF file</h4>
<small class="font-bold"></small>
</div>
<div class="modal-body">
<div class="checkbox checkbox-primary"><input id="checkbox2" type="checkbox" ng-model="getCF7533"><label for="checkbox2">CF-7533</label></div>
<div class="checkbox checkbox-primary"><input id="checkbox2" type="checkbox" ng-model="getCF3461"><label for="checkbox2">CF-3461</label></div>
<div class="checkbox checkbox-primary"><input id="checkbox2" type="checkbox" ng-model="getCF3461Alt"><label for="checkbox2">CF-3461Alt</label></div>
<div class="checkbox checkbox-primary"><input id="checkbox2" type="checkbox" ng-model="getCF7501"><label for="checkbox2">CF-7501</label></div>

</div>

<div class="modal-footer">
<button type="button" class="btn btn-white" ng-click="cancel()">Close</button>
<button type="submit" class="btn btn-primary" ng-click="ok()">RUN</button>
</div>
</div>



Esta es la parte de controller


$scope.getCF7533 = function ( oid ){
$scope.Oid = oid;

$http({
method: 'GET',
url: apiurl + "CF7533?Oid="+$scope.Oid,
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
responseType:'arraybuffer'
}).success(function(response){
var file = new Blob( [response], {type: 'application/pdf'} );
var fileURL = URL.createObjectURL(file);
window.open(fileURL);
});
};

$scope.getCF3461 = function ( oid ){
$scope.Oid = oid;

$http({
method: 'GET',
url: apiurl + "CF3461?Oid="+$scope.Oid,
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
responseType:'arraybuffer'
}).success(function(response){
var file = new Blob( [response], {type: 'application/pdf'} );
var fileURL = URL.createObjectURL(file);
window.open(fileURL);
});
};