You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<palign="center">The official library for Firebase and Angular 2</p>
2
+
<h1align="center">AngularFire</h1>
3
+
<palign="center">The official library for Firebase and Angular</p>
4
4
</p>
5
5
6
6
[](https://travis-ci.org/angular/angularfire2)[](https://gitter.im/angular/angularfire2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
7
8
8
Status: Release candidate
9
9
10
-
## What is AngularFire2?
10
+
## What is AngularFire?
11
11
12
-
-**Observable based** - Use the power of rxjs, Angular 2, and Firebase.
13
-
-**Realtime bindings** - Synchronize database collections as objects or lists.
14
-
-**Authentication** - Monitor authentication state in realtime.
12
+
-**Observable based** - Use the power of RxJS, Angular, and Firebase.
13
+
-**Realtime bindings** - Synchronize data in reatime.
14
+
-**Authentication** - Log users in with a variety of providers and monitor authentication state in realtime.
15
+
-**ngrx friendly** - Integrate with ngrx using AngularFire's action based APIs.
15
16
16
17
#### Quick links
17
18
[Contributing](CONTRIBUTING.md)
18
19
19
20
[Stackblitz Template](https://stackblitz.com/edit/angular-2ed5zx?) - Remember to set your Firebase configuration in `app/app.module.ts`.
20
21
21
-
[Upgrading to v4.0? Check out our guide.](docs/version-4-upgrade.md)
22
+
[Upgrading to v5.0? Check out our guide.](docs/version-5-upgrade.md)
Copy file name to clipboardExpand all lines: docs/1-install-and-setup.md
+10-60Lines changed: 10 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,13 @@
1
1
# 1. Installation and Setup
2
2
3
-
> Getting started with AngularFire2 is easy with the [Angular CLI](https://github.com/angular/angular-cli). Follow the 10 steps below to get started. Don't worry, we're always working to make this shorter.
4
-
5
3
> Using Ionic and the Ionic CLI? Check out these [specific instructions](6-angularfire-and-ionic-cli.md) for Ionic and their CLI.
6
4
7
5
### 0. Prerequisites
8
6
9
-
Before you start installing AngularFire2, make sure you have latest version of angular-cli installed.
10
-
To verify run the command `ng -v` and ensure you see `angular-cli: 1.x.x-beta.xx`. The lowest compatible version is `1.x.x-beta.14`.
11
-
12
-
If not, you may need to do the following:
7
+
AngularFire provides multiple module formats for different types of builds. The guide is based off the Angular CLI. It is possible to do a manual setup with Webpack or a SystemJS build as well.
13
8
14
9
```bash
15
-
# if you have the wrong cli version only
16
-
npm uninstall -g angular-cli
17
-
npm uninstall -g @angular/cli
18
-
npm cache clean
19
-
20
-
# reinstall clean version
21
-
npm install -g @angular/cli@latest
22
-
```
23
-
24
-
You need the Angular CLI, typings, and TypeScript.
25
-
26
-
```bash
27
-
npm install -g @angular/cli@latest
28
-
# or install locally
29
-
npm install @angular/cli --save-dev
30
-
# make sure you have typings installed
31
-
npm install -g typings
32
-
npm install -g typescript
10
+
npm install @angular/cli
33
11
```
34
12
35
13
### 1. Create a new project
@@ -50,13 +28,13 @@ open http://localhost:4200
50
28
51
29
You should see a message that says *App works!*
52
30
53
-
### 3. Install AngularFire 2 and Firebase
31
+
### 3. Install AngularFire and Firebase
54
32
55
33
```bash
56
34
npm install angularfire2 firebase --save
57
35
```
58
36
59
-
Now that you have a new project setup, install AngularFire2 and Firebase from npm.
37
+
Now that you have a new project setup, install AngularFire and Firebase from npm.
60
38
61
39
### 4. Add Firebase config to environments variable
62
40
@@ -79,6 +57,7 @@ export const environment = {
79
57
### 5. Setup @NgModule for the AngularFireModule
80
58
81
59
Open `/src/app/app.module.ts`, inject the Firebase providers, and specify your Firebase configuration.
60
+
82
61
This can be found in your project at [the Firebase Console](https://console.firebase.google.com):
83
62
84
63
```ts
@@ -177,17 +156,18 @@ In `/src/app/app.component.ts`:
0 commit comments