i have created an app using ionic to print a page but its not showing printing option
here is my Index codeand app.js isam getting these errors
- "utf-8">
- "viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
-
- "manifest" href="manifest.json">
- "lib/ionic/css/ionic.css" rel="stylesheet">
- "css/style.css" rel="stylesheet">
- "starter">
-
-
class ="bar-stable"> -
class
="title">Print -
-
-
"ExampleController" > - ="button" ng-click="print()">Print Webpage
- var a = angular.module('starter', ['ionic', 'ngCordova']);
- a.run(function($ionicPlatform) {
- $ionicPlatform.ready(function() {
- if (window.cordova && window.cordova.plugins.Keyboard) {
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
- cordova.plugins.Keyboard.disableScroll(true);
- }
- if (window.StatusBar) {
- StatusBar.styleDefault();
- }
- });
- });
- a.controller("ExampleController", function($scope, $cordovaPrinter) {
- $scope.print = function() {
- if ($cordovaPrinter.isAvailable()) {
- $cordovaPrinter.print("https://www.nraboy.com");
- } else {
- alert("Printing is not available on device");
- }
- }
- });
Error: [$injector:modulerr] Failed to instantiate module ng-cordova due to:
Error: [$injector:nomod] Module 'ng-cordova' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Bikesh SrivastavaPosted Sep 16, 2016, 4:56 AM