Code Monkey home page Code Monkey logo

backand-ionic2-starter's Introduction

Backand Ionic 2 Starter

Compatible with Ionic 2.0.0-rc.0

Running the app

  1. Create an Ionic app:

    ionic start myApp https://github.com/backand/backand-ionic2-starter --v2

    cd myApp

  2. Install Cordova Plugins

    ionic plugin add cordova-plugin-inappbrowser

  3. Set details of your app in src/app/app.component.ts:

    backandService.setAppName('your app name');

    backandService.setSignUpToken('your signup token');

    backandService.setAnonymousToken('your anonymousToken token');

  4. Install dependencies:

    npm install socket.io-client --save

    npm install @types/node --save-dev --save-exact

    npm install @types/socket.io-client --save-dev --save-exact

  5. Run the app

    ionic serve

CRUD

To fetch, create, and filter rows, from an object, say stuff, modify the object used in these functions:

getItems
filterItems
postItem

replacing todo with the name of your object, stuff

Social Signup

The app opens a dialog supplied by the social network.

In App

Facebook

Use the Facebook Connect plugin to obtain access to the native FB application on iOS and Android.

Install it with:

ionic plugin add cordova-plugin-facebook4 --save --variable APP_ID="<Facebook APP ID>" --variable APP_NAME="<Facebook APP NAME>"

Use BackandService function inappSocial

Socket Service

  1. To subscribe to event items_updated from server side via sockets, in your component do, as in src/app/pages/crud/crud.ts:

    this.backandService.on('items_updated') .subscribe( data => {

             },
             err => {
                 console.log(err);
             },
             () => console.log('received update from socket')
         );
    

backand-ionic2-starter's People

Contributors

kornatzky 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.