Sample Angular 2 project created with angular CLI with firebase integrated using angular fire2.
In this project I used Foundation framework instead of Bootstrap.
Project generated with angular-cli
- run
npm install
- start local server with
npm start
Sample db imports in folder _resources
Don't forget to change db rules
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
into
{
"rules": {
".read": "true",
".write": "true"
}
}
Add your firebase keys into ./src/app/app.module.ts
// Must export the config
export const firebaseConfig = {
apiKey: '<your-key>',
authDomain: '<your-project-authdomain>',
databaseURL: '<your-database-URL>',
storageBucket: '<your-storage-bucket>'
};
##List of interesting commits
- setup firebase - see commit
- get data from firebase - see commit
- implement frontend using Foundation - see commit
- use firebase query (used to filter entries from) - see commit
- add entry to firebase db - see commit
- edit and remove entry in/from firebase db - see commit