Building a Native App with Angular and Cordova

Digital Fluency · 58K views · 2018 · 5:34

Open on YouTube

Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a step-by-step walkthrough for packaging an Angular app with Cordova, and again when debugging blank screens and build errors from that setup.

Recommended by 2 people across 2 different months, 2018 to 2020.

What it is

A short tutorial from Digital Fluency showing how to wrap an existing Angular web app in Cordova to produce an installable Android or iOS app. It walks through creating a Cordova project, linking its www folder to the Angular dist output, and building and running on a device.

What people said

Recommends Zdravko Kolev · 2018-05 · Stack Overflow · on “Angular 4 packed in PhoneGap app shows blank screen”

I think you will find the following video explanation very helpful: [this video] I've used the cordova cli for project configuration and it helped me a lot. [LINK] As for the blank screen, using of "" helped indeed.

Recommends Philip · 2019-10 · Stack Overflow · on “Create a mobile app in angular and run it on android device with cordova and use cordova plugins”

I followed the steps in this [this video] and made a Cordova app with plugins that wraps an Angular app. The main point in the video is to take the files from your Angular dist folder (see [rootfolder]/ClientApp/dist) and move them into your Cordova www folder. Also, when I did it I had to modify Angular dist index.html a little bit to make it work (i.e. changing type="module" to type="text/javascript"). Also needed to add a script to index.html <script src="cordova.js" type="text/javascript"></script> [UPDATE] I realize now that I didn't actually use cordova plugins in my angular code, although it seems there is a way to do that (judging by a quick google search). All I did was add the cordova d

Cites Philip · 2019-08 · Stack Overflow · on “Angular Cordova app goes blank when cordova.js is included”

Try these: This [this video] says we need to change the <base href="/"> in your index.html to <base href="./"> . If that doesn't work, try changing your type="module" to type="text/javascript" in your index.html.

Cites Muhammad Hamza · 2020-04 · Stack Overflow · on “Failed to find 'ANDROID_HOME' environment variable even when the variable is set Cordova”

I am trying to create a mobile application from my angular app and am using cordova for converting the web app to mobile. I had followed all requirements given on the apache cordova official guide [LINK] and installed Android studio as well using this online guide [LINK] . I had also followed this [this video] youtube tutorial which explained to easily convert the angular app into a cordova application using these steps: - Create a cordova project within the angular project using cordova create <proj_name> - Create a soft link, adding a link between www folder in cordova project and dist folder of angular project - Create build - Add android to cordova project - Cordova run android Everything goe

Cites Muhammad Hamza · 2020-04 · Stack Overflow · on “The "path" argument must be of type string. Received type object - Cordova + Angular”

I am creating a mobile application from a previously created angular app. I have used this [this video] tutorial which explains how to create a native application from angular using cordova. I had carried out the following steps: Installed cordova Added environment variables Added Cordova to application Created a cordova app using cordova create mobile , which created the cordova project in <myprojectpath>/mobile Created a soft link www which redirects to dist folder of application Added android as platform (using sudo permissions, unable to do otherwise) Created build checked requirements using cordova requirements to see if anything is missing ran cordova run android in terminal (using sudo per