A simple Todo app example built with Angular 4 and AngularFire2. The app features a Firebase backend with OAuth authentication. Try the demo at ng2-todo-app.firebaseapp.com.
- Angular
4.2.4
- AngularFire2
4.0.0-rc.1
- Firebase SDK 3
- JSON Datastore
- OAuth authentication with GitHub, Google, and Twitter
- Hosting
- RxJS
- SASS
- Typescript
- Angular CLI
Prerequisits Required - Angular CLI Recommended - Yarn
$ git clone https://github.com/r-park/todo-angular2-firebase.git
$ cd todo-angular2-firebase
$ yarn
$ ng serve
- Create a free Firebase account at https://firebase.google.com
- Create a project from your Firebase account console
- Configure the authentication providers for your Firebase project from your Firebase account console
// .firebaserc
{
"projects": {
"default": "your-project-id"
}
}
// src/firebase/index.ts
export const firebaseConfig = {
apiKey: 'your api key',
authDomain: 'your-project-id.firebaseapp.com',
databaseURL: 'https://your-project-id.firebaseio.com',
storageBucket: 'your-project-id.appspot.com'
};
$ yarn global add firebase-tools
$ ng build
$ firebase login
$ firebase use default
$ firebase deploy
This project was generated with Angular CLI version 1.1.2.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.