Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70773

Using Capacitor APIs with Ionic v1

$
0
0

@juraj_synestha wrote:

So I managed to get the Capacitor working for an old Ionic v1, AngularJS - it can be built and deployed. Now I’d like to switch from using Cordova plugins to Capacitor APIs - for example Camera. In the Capacitor docs, I see this:

import { Plugins, CameraResultType } from '@capacitor/core';
const { Camera } = Plugins;

There are problems with this approach:

  1. old Ionic v1 apps use AngularJS and build process which doesn’t support ES6 imports. What can I do to support them?
  2. @capacitor/core is an NPM plugin. In Ionic v1 apps, the NPM plugins live in node_modules/, while the app source code is in www/. The app can only access packages located in www/lib/, installed by Bower - but @capacitor/core is not available via Bower.

Is there a way to use Capacitor APIs in Ionic v1, AngularJS app?
Thank you for any suggestions!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>