Skip to content

backand/backand-ionic2-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

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')
          );
      ```  

About

An Ionic 3 Starter for Backand Backend As A Service (BAAS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published