GithubHelp home page GithubHelp logo

angularfire2-scaffolding's Introduction

한국어로 보기

Angular2(RC5) & Firebase(Angularfire2) Scaffolding (unofficial)

This is a scaffolding for Angular2 & Firebase(Andgularfire2) project. And It includes some example codes (routes & firebase Goole authentication & firebase database).

Composed of


DEMO

https://angularfire2scaffoling.firebaseapp.com

Snapshot

alt


0. Prerequisites

Node 6.0+

Webpack of [email protected] requires node 6.0+. You can download it from http://www.nodejs.org .

NPM 3.0+

[email protected] requires NPM 3.0+.

npm install -g npm@latest

Typescript 2.0.0+

[email protected] requires Typescript 2.0.0+.

# This will install [email protected]+
npm install -g typescript@next
# Install typings globally
npm install -g typings

Angular-CLI beta11 (support RC5)

npm install -g angular-cli@webpack

You could get errors about typescript version, but you can ignore it because it is from Angular-CLI issue.

Angular-CLI Ref: https://github.com/angular/angular-cli

Firebase set up

  1. It needs your FirebaseApp-info including apiKey to connect your Firebase
  2. If you don't have firebase account, create it from https://firebase.google.com/
  3. Make your firebase project, then you can get your FirebaseApp-info including apiKey in your Firebase Console. It needs set the file /app/firebaseconfig.ts.

Firebase Ref: https://firebase.google.com/docs/web/setup


1. Install

  1. Download or Clone

  2. Install npm packages

# in the project folder
npm install
# if you got 'node-gyp error', then install node pakages again with '--no-optional'
npm install --no-optional 
  1. Init typings
# This command will create typings.json
typings init

2. Firebase Sets Up

  1. Rename /app/firebaseconfig.sample.ts to /app/firebaseconfig.ts

  2. Put your FirebaseApp-info like apiKey into the file /app/firebaseconfig.ts

// /app/firebaseconfig.ts
export class FirebaseConfig {
   public static get CONFIG_DATA(): any {
        return ({
            apiKey: "<your-key>",
            authDomain: "<your-project-authdomain>",
            databaseURL: "<your-database-URL>",
            storageBucket: "<your-storage-bucket>"
        });
    }
}

3. Run

ng serve

Angular-CLI Ref: https://github.com/angular/angular-cli


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.