Giter Club home page Giter Club logo

angular-connect-2015-write-once-run-anywhere's Introduction

Sample application based on Angular 1.4, AdminLTE - with Cordova and nw.js

Template for live coding is in live-coding-template branch.

##VIDEO Tutorial Angular Connect

Pre-Requirements

  • npm i -g gulp
  • npm i -g cordova
  • npm i -g ionic
  • npm i -g ios-sim
  • npm i -g ios-deploy
  • npm i -g nw

COMMAND INSTRUCTIONS

  • > git clone ...repo
  • > cd repodir && npm install
  • > gulp dev:livereload

or simply npm run live to test web in http://localhost:8000

MOBILE (Cordova: iOS/Android/Win UAP)

  • > cordova create cordova net.tt.boardz BoardZ
  • > cd cordova
  • > cordova platform add ios --save
  • > cordova platform add android --save
  • > cordova platform add windows --save
  • > cordova plugin add cordova-plugin-whitelist cordova-plugin-statusbar cordova-plugin-splashscreen cordova-plugin-geolocation cordova-plugin-camera cordova-plugin-crosswalk-webview --save
  • > gulp cordova:default

or simply npm run mobile to build for mobile (iOS/Android/Win UAP)

  • > cordova run ios
  • For live reload on iOS first open another terminal tab and run
  • > gulp cordova:watch:ios
  • And to debug open Safari and then menu Develop -> Simulator -> select localhost and you get Develoer Tools connected to running app to debug HTML/CSS/JS/Stack Trace etc...

or simply npm run ios to run project on iOS Simulator

  • > cordova run android

or simply npm run android to run project on Android Simulator (SLOW)

For Windows open Win10 VM and copy ./cordova/platform/windows directory in local C:\PROJECTS\windows and

  • open C:\PROJECTS\windows\CordovaApp solution with VS2015 and set CordovaApp.Windows10 Set as Startup Project and run with F5

###DESKOTP (NWjs: Mac/Win/Linux)

  • > mkdir nwjs && cd nwjs
  • > touch package.json && open package.json and put this inside it
{
  "name": "BoardZ!",
  "version": "1.0.0",
  "main": "www/index.html",
  "window": {
    "title": "BoardZ! Desktop",
    "toolbar": false,
    "resizable": true,
    "fullscreen": false,
    "width": 1024,
    "height": 768
  }
}
  • > gulp nwjs:default

or simply npm run desktop to build for all desktop platform: Mac/Win/Linux

  • > nw .

or simply npm run mac to run native Mac application, that support Live reload and Debugging pressing SHIFT+CTRL+D to open Chromium Developer Tools

  • The same for other platform that you find in ./nwjs/build --> win32/win64/osx64/linux32/linux64 all Native desktop app!

Requirements

Setup

Building

The gulp task will build iOS, Windows Phone, Android phone apps as well as desktop apps for Mac OSX, Windows and Linux. To get it working, please do the following:

  • Only after cloning the repo: npm i within the root folder of this repository
  • Live reloads:
    • Run gulp dev:livereload to start a live server, which is best when developing the app
    • Run gulp nwjs:watch and within nwjs-folder nw . for nwjs live reloading
    • Run gulp cordova:watch:ios and within the cordova folder cordova run ios for cordova live reloading (only works for iOS, not for Android or Windows Phone)
  • Run gulp to build all apps in release mode (will execute gulp build:all:release)
  • Debug Mode: Use the following gulp tasks to build the apps in debug mode
    • Run gulp build:all to build all apps in debug mode
    • Run gulp dist:default to build the web app in (and use static within the dist/ folder to explore the app)
    • Run gulp cordova:default to build all phone related apps
    • Run gulp nwjs:default to build all desktop related apps
  • Release Mode: Use the following gulp tasks to build the apps in release mode
    • Run gulp build:all:release to build all apps in debug mode
    • Run gulp dist:release to build the web app in (and use static within the dist/ folder to explore the app)
    • Run gulp cordova:release to build all phone related apps
    • Run gulp nwjs:release to build all desktop related apps

Usage

  • To login just use username = password (eg. user: bob, password: bob).
  • If you don't want to use the Azure Web API, you can run the server by yourself by starting the BoardGame.Host project with Visual Studio and change the url within the AngularJS app. The server will run on port 9090.
  • If starting the server leads into a TargetInvocationException, you'll need to add a url to your urlacl settings by executing the following command (on Windows :)) in an elevated command line: netsh http add urlacl url=http://+:9090/ user=your_user_name

Supported platforms

  • Any modern web browser (Chrome, Firefox, Edge, Safari) by simply hosting it
  • Mobile platforms (iOS, Android, Windows) by packaging the app using Cordova
  • Desktop platforms (Windows, Mac OS X, Linux) by packaging the app using NW.js

Third-Party Libraries

JavaScript, CSS

Native Wrappers

Additional Resources

angular-connect-2015-write-once-run-anywhere's People

Contributors

manuelrauber avatar

Watchers

 avatar  avatar

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.