ionic ng cordova TypeError: "Cannot read property 'printer' of undefined" -
.controller('myctrl', function($scope,$cordovaprinter, ) {
$scope.print = function() { console.log('print method here'); var page = document.getelementbyid('print_id'); if($cordovaprinter.isavailable()) { $cordovaprinter.print(page, 'document.html', function () { alert('printing finished or canceled') }); } }
give me suggestion regarding error. thanks
Comments
Post a Comment