NavController doesn’t work in Ionic 4

Now, to complete the final step and implement those routes in our app-routing.module.ts file, they would look like this: const routes: Routes = [ { path: ”, redirectTo: ‘/home’, pathMatch: ‘full’ }, { path: “https://stackoverflow.com/questions/51828017/home”, loadChildren: ‘./pages/home/home.module#HomeModule’ }, { path: ‘products’, loadChildren: ‘./pages/products/products.module#ProductsModule’}, { path: ‘products/:id’, loadChildren: ‘./pages/product-detail/product-detail.module#ProductDetailModule’ }, { path: ‘products/categories’, loadChildren: ‘./pages/product-categories/product-categories. { … Read more

how to show pdf file in ionic app with out download

You will need to use ng-pdfviewer. AngularJS PDF viewer directive using pdf.js. <button ng-click=”prevPage()”>&lt;</button> <button ng-click=”nextPage()”>&gt;</button> <br> <span>{{currentPage}}/{{totalPages}}</span> <br> <pdfviewer src=”https://stackoverflow.com/questions/43496455/test.pdf” on-page-load=’pageLoaded(page,total)’ id=”viewer”></pdfviewer> and in your AngularJS code: var app = angular.module(‘testApp’, [ ‘ngPDFViewer’ ]); app.controller(‘TestCtrl’, [ ‘$scope’, ‘PDFViewerService’, function($scope, pdf) { $scope.viewer = pdf.Instance(“viewer”); $scope.nextPage = function() { $scope.viewer.nextPage(); }; $scope.prevPage = function() { … Read more

cordova – Error: Failed to fetch platform android

I had the same problem with the [email protected] version. I solved this issue, checking what version of android is provided by cordova. You can check it in C:/Users/%USER%/.cordova/lib/npm-cache/cordova-android Then, you install the android platform version provided. For me it was @5.1.0 which was in my cordova-android folder. So I used the cmd line following: cordova … Read more

Issue with Android Hybid app to display remote image with Ionic framework?

Whitelisting the domains using cordova-plugin-whitelist solves the issue. Add the plugin via CLI: cordova plugin add cordova-plugin-whitelist and then add the following line of code to your app’s config.xml: <allow-navigation href=”http://*/*” /> and this meta tag in your index.html <meta http-equiv=”Content-Security-Policy” content=”default-src *; style-src ‘self’ ‘unsafe-inline’; script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval'”> EDIT: The reason for this … Read more