Skip to content

Commit 53c06d2

Browse files
committed
docs(fix): clean up old docs
1 parent 76bfb1d commit 53c06d2

6 files changed

+47
-819
lines changed

docs/6-angularfire-and-ionic-cli.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ import { Observable } from 'rxjs/Observable';
157157
templateUrl: 'home.html'
158158
})
159159
export class HomePage {
160-
items: FirebaseListObservable<any[]>;
160+
items: Observable<any[]>;
161161
constructor(
162162
public db: AngularFireDatabase,
163163
public navCtrl: NavController,
@@ -173,21 +173,20 @@ In `/src/pages/home/home.ts`:
173173
```ts
174174
import { Component } from '@angular/core';
175175
import { NavController } from 'ionic-angular';
176-
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
176+
import { AngularFireDatabase } from 'angularfire2/database';
177+
import { Observable } from 'rxjs/Observable';
177178

178179
@Component({
179180
selector: 'page-home',
180181
templateUrl: 'home.html'
181182
})
182183
export class HomePage {
183-
items: FirebaseListObservable<any[]>;
184+
items: Observable<any[]>;
184185
constructor(
185186
public db: AngularFireDatabase,
186187
public navCtrl: NavController,
187188
) {
188-
// In this case, '/list' is a placeholder.
189-
this.items = db.list('/list')
190-
189+
this.items = db.list('list').valueChanges();
191190
}
192191

193192
}
@@ -202,7 +201,7 @@ Open `/src/pages/home/home.html`:
202201

203202
<ion-content padding>
204203
<ion-item *ngFor="let item of items | async">
205-
{{item.$value}}
204+
{{item | json}}
206205
</ion-item>
207206
</ion-content>
208207
```
@@ -213,5 +212,5 @@ Open `/src/pages/home/home.html`:
213212
ionic serve
214213
```
215214

216-
And that's it! If there's any issues, be sure to file an issue on the Angularfire repo or the Ionic repo, depending on who's to blame :smile:
215+
That's it! If there's any issues, be sure to file an issue on the AngularFire repo or the Ionic repo, depending on who's to blame :smile:
217216

docs/Auth-with-Ionic2.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Using AngularFire2 with Ionic 2
1+
# Using AngularFire with Ionic 2
22

3-
This document provides you a walkthrough of integrating AngularFire2 Authentication with Ionic2.
3+
This document provides you a walkthrough of integrating AngularFire Authentication with Ionic2.
44
The below setup has been tested on Windows 10, but it should be same for Mac/Linux.
55

66
Ensure that you're executing these commands as **Administrator** on Windows and **sudo** on Mac/Linux to avoid any errors.
@@ -59,28 +59,28 @@ C:\projects>ionic -v
5959

6060
These are the latest versions as of writting this document.
6161

62-
On successful execution of above commands, you're all set to create your Ionic 2 app.
62+
On successful execution of above commands, you're all set to create your Ionic app.
6363
To create your app, change into the directory where you want your app to reside and execute the following command
6464

6565
```bash
6666

67-
C:\projects> ionic start Ionic_AngularFire2_Project blank --v2
67+
C:\projects> ionic start Ionic_AngularFire_Project blank --v2
6868

6969
```
7070

71-
>The command ionic start will create the project with name "Ionic_AngularFire2_Project" using "blank" template.
71+
>The command ionic start will create the project with name "Ionic_AngularFire_Project" using "blank" template.
7272
7373
>The --v2 flag ensures, this is a Ionic2 project.
7474
7575
Change to the project directory, which was just created with above command
7676

77-
>C:\projects\Ionic_AngularFire2_Project>
77+
>C:\projects\Ionic_AngularFire_Project>
7878
7979
To start your app, execute the following command
8080

8181
```bash
8282

83-
C:\projects\Ionic_AngularFire2_Project> ionic serve
83+
C:\projects\Ionic_AngularFire_Project> ionic serve
8484

8585
```
8686

@@ -95,37 +95,37 @@ external libraries and extend this application.
9595

9696
```bash
9797

98-
C:\projects\Ionic_AngularFire2_Project>npm install -g typings
98+
C:\projects\Ionic_AngularFire_Project>npm install -g typings
9999

100-
C:\projects\Ionic_AngularFire2_Project>npm install -g typescript
100+
C:\projects\Ionic_AngularFire_Project>npm install -g typescript
101101

102102
```
103103

104104
Check typings and typescript versions by executing following commands:
105105

106106
```bash
107107

108-
C:\projects\Ionic_AngularFire2_Project>typings -v
108+
C:\projects\Ionic_AngularFire_Project>typings -v
109109
2.0.0
110110

111-
C:\projects\Ionic_AngularFire2_Project>tsc -v
111+
C:\projects\Ionic_AngularFire_Project>tsc -v
112112
Version 2.0.10
113113

114114
```
115115

116-
### Configuring AngularFire2 and Firebase
116+
### Configuring AngularFire and Firebase
117117

118-
Install angularfire2 and firebase by executing the following command in your project directory
118+
Install AngularFire and firebase by executing the following command in your project directory
119119

120120
```ts
121121

122-
C:\projects\Ionic_AngularFire2_Project>npm install angularfire2 firebase --save
122+
C:\projects\Ionic_AngularFire_Project>npm install AngularFire firebase --save
123123

124124
```
125125

126-
_This should add angularfire2 and firebase entry in your project's package.json file in dependencies section. Something similar_
126+
_This should add AngularFire and firebase entry in your project's package.json file in dependencies section. Something similar_
127127

128-
>"angularfire2": "^2.0.0-beta.6",
128+
>"AngularFire": "^2.0.0-beta.6",
129129
130130
>"firebase": "^3.6.1",
131131
@@ -149,7 +149,7 @@ import { IonicApp, IonicModule } from 'ionic-angular';
149149
import { MyApp } from './app.component';
150150
import { HomePage } from '../pages/home/home';
151151

152-
import { AngularFireModule } from 'angularfire2';
152+
import { AngularFireModule } from 'AngularFire';
153153

154154
export const firebaseConfig = {
155155
apiKey: "xxxxxxxxxx",
@@ -195,7 +195,7 @@ Your `home.ts` file should look like this.
195195
import { Component } from '@angular/core';
196196
import { NavController } from 'ionic-angular';
197197

198-
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
198+
import { AngularFireDatabase, FirebaseListObservable } from 'AngularFire/database';
199199

200200
@Component({
201201
selector: 'page-home',
@@ -239,20 +239,20 @@ export class HomePage {
239239

240240
```bash
241241

242-
C:\projects\Ionic_AngularFire2_Project> ionic serve
242+
C:\projects\Ionic_AngularFire_Project> ionic serve
243243

244244
```
245245

246246
This should fetch the data from firebase.
247247

248-
## Configuring AngularFire2 Auth with Ionic2
248+
## Configuring AngularFire Auth with Ionic2
249249

250250
Continuing with the above example stop your server by pressing `ctrl+c` and go to command prompt and
251251
generate a service by executing the following command
252252

253253
```bash
254254

255-
C:\projects\Ionic_AngularFire2_Project> ionic g provider AuthService
255+
C:\projects\Ionic_AngularFire_Project> ionic g provider AuthService
256256

257257
```
258258

@@ -262,7 +262,7 @@ Update the service with the following code.
262262
```typescript
263263
import { Observable } from 'rxjs/Observable';
264264
import { Injectable } from '@angular/core';
265-
import { AngularFireAuth } from 'angularfire2/auth';
265+
import { AngularFireAuth } from 'AngularFire/auth';
266266
// Do not import from 'firebase' as you'll lose the tree shaking benefits
267267
import * as firebase from 'firebase/app';
268268

@@ -306,7 +306,7 @@ import { IonicApp, IonicModule } from 'ionic-angular';
306306
import { MyApp } from './app.component';
307307
import { HomePage } from '../pages/home/home';
308308

309-
import { AngularFireModule } from 'angularfire2';
309+
import { AngularFireModule } from 'AngularFire';
310310
import { AuthService } from '../providers/auth-service';
311311

312312

@@ -371,7 +371,7 @@ import { Component } from '@angular/core';
371371
import { NavController } from 'ionic-angular';
372372

373373
import { AuthService } from '../../providers/auth-service';
374-
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
374+
import { AngularFireDatabase, FirebaseListObservable } from 'AngularFire/database';
375375

376376
@Component({
377377
selector: 'page-home',
@@ -412,7 +412,7 @@ Ensure you've the platform added to your project. If not add the platform by exe
412412

413413
```
414414
415-
C:\projects\Ionic_AngularFire2_Project>ionic platform add android
415+
C:\projects\Ionic_AngularFire_Project>ionic platform add android
416416
417417
```
418418

@@ -423,7 +423,7 @@ Now, let's try to run the app in browser. Execute the command
423423

424424
```
425425
426-
C:\projects\Ionic_AngularFire2_Project> ionic run android
426+
C:\projects\Ionic_AngularFire_Project> ionic run android
427427
428428
```
429429

@@ -440,7 +440,7 @@ _Ensure you follow the steps correctly to configure your app._
440440
Once you create your app and make a note of your App ID, go to command prompt in your project directory and execute the following command
441441

442442
```
443-
C:\projects\Ionic_AngularFire2_Project>
443+
C:\projects\Ionic_AngularFire_Project>
444444
ionic plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApp"
445445
446446
```
@@ -465,7 +465,7 @@ your ```auth-service.ts``` code should look like this.
465465
```ts
466466
import { Observable } from 'rxjs/Observable';
467467
import { Injectable } from '@angular/core';
468-
import { AngularFireAuth } from 'angularfire2/auth';
468+
import { AngularFireAuth } from 'AngularFire/auth';
469469
// Do not import from 'firebase' as you'll lose the tree shaking benefits
470470
import * as firebase from 'firebase/app';
471471

@@ -516,15 +516,15 @@ Verfiy your app is running in browser by executing the following command
516516

517517
```
518518
519-
C:\projects\Ionic_AngularFire2_Project>ionic serve
519+
C:\projects\Ionic_AngularFire_Project>ionic serve
520520
521521
```
522522

523523
Everything should work. Now trying running the app on your android phone
524524

525525
```
526526
527-
C:\projects\Ionic_AngularFire2_Project> ionic run android
527+
C:\projects\Ionic_AngularFire_Project> ionic run android
528528
529529
```
530530

docs/Auth-with-Ionic3-Angular4.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Using AngularFire2 with Ionic 3-Angular 4
1+
# Using AngularFire with Ionic
22

3-
This tutorial provides a walkthrough of integrating AngularFire2 Authentication with Ionic3/Angular4.
3+
This tutorial provides a walkthrough of integrating ANgularFIre Authentication with Ionic 3 /Angular 4+.
44
The below setup has been tested on Windows 10, but it should be same for Mac/Linux.
55

66
Note: - If you're working with Ionic2 and Angular2.0, then you should refer to **Auth-with-Ionic2** tutorial
@@ -243,7 +243,7 @@ export class AppModule {}
243243
Now inject AngularFireDatabase in your component. Open your `home.ts` by going into `src/pages/home/home.ts` and make the
244244
following changes:
245245

246-
>1) Import "AngularFireDatabase, FirebaseListObservable" at the top of your component.
246+
>1) Import "AngularFireDatabase" at the top of your component.
247247
248248
>2) Inject your AngularFireDatabase dependency in the constructor.
249249
@@ -256,17 +256,18 @@ Your `home.ts` file should look like this.
256256
import { Component } from '@angular/core';
257257
import { NavController } from 'ionic-angular';
258258

259-
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
259+
import { AngularFireDatabase } from 'angularfire2/database';
260+
import { Observable } from 'rxjs/Observable';
260261

261262
@Component({
262263
selector: 'page-home',
263264
templateUrl: 'home.html'
264265
})
265266
export class HomePage {
266-
items: FirebaseListObservable<any[]>;
267+
items: Observable<any[]>;
267268

268269
constructor(public navCtrl: NavController, afDB: AngularFireDatabase) {
269-
this.items = afDB.list('/cuisines');
270+
this.items = afDB.list('cuisines').valueChanges();
270271
}
271272

272273
}
@@ -290,7 +291,7 @@ export class HomePage {
290291
<ion-content padding>
291292
<ion-list>
292293
<ion-item class="text" *ngFor="let item of items | async">
293-
{{item.$value}}
294+
{{item | json}}
294295
</ion-item>
295296
</ion-list>
296297
</ion-content>
@@ -344,7 +345,7 @@ The `home.html` should look like below
344345
<ion-header>
345346
<ion-navbar>
346347
<ion-title>
347-
Auth with Ionic 3
348+
Auth with Ionic
348349
</ion-title>
349350
</ion-navbar>
350351
</ion-header>
@@ -465,7 +466,7 @@ and `home.html` shouldlook like this
465466
<ion-header>
466467
<ion-navbar>
467468
<ion-title>
468-
Auth with Ionic 3
469+
Auth with Ionic
469470
</ion-title>
470471
</ion-navbar>
471472
</ion-header>

0 commit comments

Comments
 (0)