https://github.com/avine/angular-todo
Manage your todo list with Angular
https://github.com/avine/angular-todo
angular4 angularfire2 bootstrap4 firebase
Last synced: 8 months ago
JSON representation
Manage your todo list with Angular
- Host: GitHub
- URL: https://github.com/avine/angular-todo
- Owner: avine
- License: mit
- Created: 2017-06-22T08:31:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-27T23:14:44.000Z (over 8 years ago)
- Last Synced: 2024-11-06T17:50:10.983Z (about 1 year ago)
- Topics: angular4, angularfire2, bootstrap4, firebase
- Language: TypeScript
- Homepage: https://avine.io/projects/angular-todo
- Size: 639 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-todo
Manage your todo list with Angular 4, Bootstrap 4 and Firebase 4.
## Configure app
```bash
npm install
```
First things first, install `npm` packages...
## Configure Firebase
```bash
firebase login
firebase init
```
Login into your Firebase account and initialize a Firebase project in this directory.
Select features: *Realtime Database* and *Hosting sites*.
In this process, do NOT overwrite existing `database.rules.json` and set `dist/` as your public directory.
```javascript
export const environment = {
firebase: {
apiKey: '',
authDomain: '.firebaseapp.com',
databaseURL: 'https://.firebaseio.com'
}
};
```
Open `environment.ts` and `environment.prod.ts` files and initialize Firebase with your project's customized code snippet.
## Build
```bash
npm run build:prod -- --bh / --langs en,fr --dl fr
```
Build the app in the `dist/` folder.
| Options | Meaning |
| ------- | ------- |
| `--bh` | Configure the --baseHref for `angular-cli` |
| `--lang` | List of supported languages separated by coma |
| `--dl` | Set the default language |
| `--htaccess` | Add `.htaccess` for URL rewriting (if deployed on Apache web server) |
## Deploy
```bash
firebase deploy
```
Deploy Firebase realtime database and hosting.
## Run locally
| Script | Purpose |
| ------ | ------- |
| `npm start` | Serve app without i18n |
| `npm run start:fr` | Build app using i18n french translation |
| `npm run start:dist` | After building the app using `npm run build:prod` open an `http-server` to serve the `dist/` folder. Notice that `.htaccess` will have no effect. |
## Internationalization
```bash
npm run i18n
```
Update the master translation file: `src/i18n/messages.xlf`.
Don't forget to update `messages.fr.xlf` accordingly...
## Demo
Firebase hosting:
https://angular-todo-avine.firebaseapp.com/
Apache web server:
https://avine.io/projects/angular-todo/
## Screenshots
#### Sign in page:

#### Main page: