Giter Club home page Giter Club logo

ngcordova's Introduction

NgCordova: Angular 4 + Cordova boilerplate

This project is using Angular 4 + Cordova boilerplate configurated to work together so you can start building your great Hybrid Cordova Mobile Apps in Angular 4.

Installation

  • Install Node.js from: https://nodejs.org/en/download/
  • Install Cordova using: npm install -g cordova
  • Clone ngCordova repository: git clone https://github.com/NavCore/ngCordova.git
  • Go to ngCordova repository: cd ngCordova
  • Install dependencies: npm install

Development server

  • Development project folder is src/. You should start building your Angular 4 app there!
  • Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Angular project base URL

  • For Android App to work, change base url in index.html to: <base href="file:///android_asset/www/"> or simple: <base href=".">
  • For iOS App to work, change base url in index.html to: <base href="./"> or <base href=".">
  • Then build the Angular project

Build Angular project

  • Run ng build to build the Angular project.
  • The build artifacts will be stored in the www/ directory.
  • Use the -prod flag for a production build.

Adding Cordova platform

  • Go to ngCordova repository: cd ngCordova
  • List available Cordova platforms: cordova platform ls
  • Add a desired platform: cordova platform add [ browser | android | .. ]

Run Cordova app

  • After adding Cordova platform, we can run our app in desired platform: cordova run [ browser | android | .. ]
  • There is a known problem with emulating Android app using: cordova emulate android, so use cordova run android

Build Cordova project

  • Run cordova build [ browser | android | .. ] to build the Cordova project.
  • For example android build .apk is located in: platforms/android/build/outputs/apk/

ngcordova's People

Contributors

navcore avatar angular-cli avatar

Stargazers

 avatar Sam Tran avatar Muhammad Awais avatar Tristan Jesse avatar pelli avatar Rajkamal23 avatar Harold Hersey avatar Joel Godden avatar Adam avatar Jordi Escudero Subirana avatar Krishna Komanduri avatar  avatar Siew-Mai Chan avatar  avatar Diego Maehler avatar Rishikesh avatar InternetGuy avatar Nisim Joseph avatar DCALDERONV avatar Javier Alfonso avatar Sandeep Kunkunuru avatar An12 avatar Ramon Buckland avatar  avatar  avatar Jerome David Yackley avatar Leonard C. Modoran avatar  avatar

Watchers

Abhilash Joseph C avatar  avatar An12 avatar Zinou avatar

ngcordova's Issues

CordovaError when run cordova platform ls

When run the command "cordova platform ls" I got "CordovaError: Current working directory is not a Cordova-based project." and I have checked I am in the ngCordova diretory.

Blank White Screen

When i run : 'cordova run android' command i'm getting blank white screen !!!!
'cordova run browser' works perfectly and there is no error in console

Failed to find 'ANDROID_HOME' environment variable.

cordova platform ls,
cordova platform add android
are working fine. After that executing
cordova run android
I am getting this error.

E:\ngCordova>cordova run android
Android Studio project detected
(node:5948) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to find 'ANDROID_HOME' environment variable. Try setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.

my index.html path is

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.