Skip to content

ng-harmony-zz/ng-harmony-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Harmony = 6 + 7;

ng-harmony-firebase

Synopsis

So, since google now offers free basic firebase app-backends, it's only natural to write a decently ng-harmony-integrated wrapper.

Code Example

import { Controller } from "ng-harmony/ng-harmony";
import { FirebaseLogin } from "ng-harmony/ng-harmony-firebase";


class LoginController extends Controller.mixin(FirebaseLogin) {
    constructor (...args) {
        super(...args);
        this.initialize({/* firebase app-config here */});
    }
    "#googleLogin::click" () {
        this.signIn("google");
    }
    "#facebookLogin::click" () {
        this.signIn("facebook");
    }
    continue () {
        this.$state.go("home");
    }
}
LoginController.$inject("$state");

Motivation

I wanted to provide a dynamic page on github.io. So I didn't want to host an API-backend on a server only, when there was the possibility to utilize firebase freely as well.

Installation

I recommend the usage of jspm. This way, just base your project upon jspm and start using this lib as in the code example above.

jspm i github:ng-harmony/ng-harmony-firebase

API Reference

FirebaseLogin (Root-Class)

initialize: initialize googles firebase background-lib with your apps config signIn: use firebase with your social login-service of choice

Contributors

Drop me an email at <johannes.neugschwentner> at dot

License

MIT

About

a dedicated DataService for google's firebase

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published