Skip to content

Commit 78c40b0

Browse files
dependencies & readme updated, retested
1 parent 98f02a6 commit 78c40b0

File tree

6 files changed

+13360
-9431
lines changed

6 files changed

+13360
-9431
lines changed

README.md

Lines changed: 48 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Ionic Angular Project
1+
# :zap: Ionic Angular Project
22

33
App to create Airbnb-style property listings with pages to make bookings and update property details. Code taken from Udemy Tutorial: [Ionic 4 - Build iOS, Android & Web Apps with Ionic & Angular](https://www.udemy.com/ionic-2-the-practical-guide-to-building-ios-android-apps/), using the [Ionic 5 framework](https://ionicframework.com/docs).
44

5-
## Table of contents
5+
## :page_facing_up: Table of contents
66

7-
* [Ionic Angular Project](#ionic-angular-project)
8-
* [Table of contents](#table-of-contents)
9-
* [General info](#general-info)
7+
* [:zap: Ionic Angular Project](#zap-ionic-angular-project)
8+
* [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)
9+
* [:books: General info](#books-general-info)
1010
* [RxJS operators](#rxjs-operators)
11-
* [Ionic Controllers Used](#ionic-controllers-used)
12-
* [Observables](#observables)
13-
* [Array Operators](#array-operators)
14-
* [Screenshots](#screenshots)
15-
* [Technologies](#technologies)
16-
* [Setup](#setup)
17-
* [Code Examples (taken from Udemy course with my comments added)](#code-examples-taken-from-udemy-course-with-my-comments-added)
18-
* [Features](#features)
19-
* [Status & To-do list](#status--to-do-list)
20-
* [Inspiration](#inspiration)
21-
* [Contact](#contact)
22-
23-
## General info
11+
* [:books: Ionic Controllers Used](#books-ionic-controllers-used)
12+
* [:books: Observables](#books-observables)
13+
* [:books: Array Operators](#books-array-operators)
14+
* [:camera: Screenshots](#camera-screenshots)
15+
* [:signal_strength: Technologies](#signal_strength-technologies)
16+
* [:floppy_disk: Setup](#floppy_disk-setup)
17+
* [:computer: Code Examples (taken from Udemy course with my comments added)](#computer-code-examples-taken-from-udemy-course-with-my-comments-added)
18+
* [:cool: Features](#cool-features)
19+
* [:clipboard: Status & To-do list](#clipboard-status--to-do-list)
20+
* [:clap: Inspiration](#clap-inspiration)
21+
* [:envelope: Contact](#envelope-contact)
22+
23+
## :books: General info
2424

2525
* App to view and book places to stay. All places listed on the 'discover.page' and clicking on an item navigate to a place detail page using the place id in the browser.
2626
* Places are displayed under 2 list option: 'ALL PLACES' and 'BOOKABLE PLACES'. The first place is displayed using an ion-card, the remaining places are displayed using a list with a thumbnail image. There is code to prevent the user from being able to book their own places, using a userId matching function to show/hide the booking button.
@@ -31,65 +31,56 @@ App to create Airbnb-style property listings with pages to make bookings and upd
3131

3232
## [RxJS operators](http://reactivex.io/documentation/observable.html)
3333

34-
**general** all operators return observables. You have to subscribe to observables.
34+
* **general** all operators return observables. You have to subscribe to observables.
35+
* **switchMap** for http requests that emit just one value and for long-lived streams for Firebase real-time database and authentication. They do not need to be unsubscribed as they complete after emission. **switch:** because the result observable has switched from emitting the values of the first inner observable, to emitting the values of the newly created inner (derived) observable. The previous inner observable is cancelled and the new observable is subscribed. **map:** because what is being mapped is the emitted source value, that is getting mapped to an observable using the mapping function passed to switchMap. (The alternative operator is mergeMap).
36+
* **of** used with a single value for an 'emit once and complete' stream.
37+
* **take** emits only the first n values from an observable (e.g. take(1) emits only the first 2 values )
38+
* **tap** used to perform side effects. Every data value is received from the source, an action is taken on a part of the data then the data passeed on unchanged.
39+
* **map** transforms things. It passes each source value through a transformation function then outputs the results, e.g map(x => 10*x).
40+
* **pipe** composes operators. Creates a pipeline of small reusable operators like map and filter.
41+
* **from** converts a mix of other objects and data types into Observables
3542

36-
**switchMap** for http requests that emit just one value and for long-lived streams for Firebase real-time database and authentication. They do not need to be unsubscribed as they complete after emission. **switch:** because the result observable has switched from emitting the values of the first inner observable, to emitting the values of the newly created inner (derived) observable. The previous inner observable is cancelled and the new observable is subscribed. **map:** because what is being mapped is the emitted source value, that is getting mapped to an observable using the mapping function passed to switchMap. (The alternative operator is mergeMap).
37-
38-
**of** used with a single value for an 'emit once and complete' stream.
39-
40-
**take** emits only the first n values from an observable (e.g. take(1) emits only the first 2 values )
41-
42-
**tap** used to perform side effects. Every data value is received from the source, an action is taken on a part of the data then the data passeed on unchanged.
43-
44-
**map** transforms things. It passes each source value through a transformation function then outputs the results, e.g map(x => 10*x).
45-
46-
**pipe** composes operators. Creates a pipeline of small reusable operators like map and filter.
47-
48-
**from** converts a mix of other objects and data types into Observables
49-
50-
## Ionic Controllers Used
43+
## :books: Ionic Controllers Used
5144

5245
* [Alert Controller](https://ionicframework.com/docs/api/alert) alert appears on top of app contents.
53-
5446
* [Loading Controller](https://ionicframework.com/docs/api/loading) overlay used to display activity and block user input. Loading indicators can be created, including spinners.
5547

56-
## Observables
57-
58-
An [observable](https://rxjs-dev.firebaseapp.com/guide/observable) is created using 'new Observable'. It is subscribed to using an Observer and executed to deliver next / error / complete notices to the Observer, before the execution is disposed of. Subscribers should be wrapped in try/catch blocks.
48+
## :books: Observables
5949

60-
a [BehaviourSubject](http://reactivex.io/rxjs/manual/overview.html#behaviorsubject) is a subject that requires an initial value and emits its current value to subscribers.
50+
* An [observable](https://rxjs-dev.firebaseapp.com/guide/observable) is created using 'new Observable'. It is subscribed to using an Observer and executed to deliver next / error / complete notices to the Observer, before the execution is disposed of. Subscribers should be wrapped in try/catch blocks.
51+
* a [BehaviourSubject](http://reactivex.io/rxjs/manual/overview.html#behaviorsubject) is a subject that requires an initial value and emits its current value to subscribers.
6152

62-
## Array Operators
53+
## :books: Array Operators
6354

6455
* [Array.push()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) adds one or more elements to the end of an array and returns the new aray length.
6556

66-
## Screenshots
57+
## :camera: Screenshots
6758

6859
![page](./img/discover-places-page.png)
6960
![page](./img/discover-place-detail.png)
7061
![page](./img/new-offer.png)
7162
![page](./img/my-offers-page.png)
7263
![page](./img/firebase-database.png)
7364

74-
## Technologies
65+
## :signal_strength: Technologies
7566

76-
* [Ionic v5.0.0](https://ionicframework.com/)
77-
* [Angular v8.1.2](https://angular.io/)
78-
* [Ionic/angular v 4.7.1](https://ionicframework.com/)
79-
* [RxJS v6.5.1](https://angular.io/guide/rx-library)
67+
* [Ionic v5](https://ionicframework.com/)
68+
* [Angular v10](https://angular.io/)
69+
* [Ionic/angular v5](https://ionicframework.com/)
70+
* [RxJS v6](https://angular.io/guide/rx-library)
8071
* [Google Firebase](https://firebase.google.com)
8172
* [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/tutorial)
82-
* [Capacitor v1.1.1](https://capacitor.ionicframework.com/)
73+
* [Capacitor v2](https://capacitor.ionicframework.com/)
8374
* [Ionic PWA Elements](https://www.npmjs.com/package/@ionic/pwa-elements)
8475

85-
## Setup
76+
## :floppy_disk: Setup
8677

78+
* Add Google maps and firebase API keys to environment.ts
8779
* To start the server on _localhost://8100_ type: `ionic serve`
88-
* npm i --save-dev @angular-devkit/schematics
8980
* To generate normal www build file: `ionic build`
9081
* Build for Android app: `ionic capacitor run android`
9182

92-
## Code Examples (taken from Udemy course with my comments added)
83+
## :computer: Code Examples (taken from Udemy course with my comments added)
9384

9485
* extract from `map.modal.component.ts` - function to show location using google Maps API.
9586

@@ -139,7 +130,7 @@ private getGoogleMaps(): Promise<any> {
139130

140131
```
141132

142-
## Features
133+
## :cool: Features
143134

144135
* Authorization module using Angular Routing with the Angular [canLoad auth guard interface](https://angular.io/api/router/CanLoad) to prevent access to pages if user is not logged in.
145136
* [Theme variables.scss](https://ionicframework.com/docs/theming/css-variables) file used to create a global color theme using the [Ionic color palette](https://ionicframework.com/docs/theming/color-generator) (note colors were in rgb not #hex as shown in the Ionic tutorial).
@@ -148,6 +139,8 @@ private getGoogleMaps(): Promise<any> {
148139
* Error handling added
149140
* [Firebase backend database](https://firebase.google.com) used to store place and booking data. Images are stored in the same database.
150141
* Bookings can be cancelled from booking.page.
142+
* Bookings can be made and new places added to offers page. If a different user is logged in they cannot book their own places (the booking button does not show) - which is correct.
143+
* Camera images now show.
151144
* Place details can be edited (as long as user id matches) using a neat button that slides from the right.
152145
* [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/tutorial) map-modal added to new-offer page. Clicking on 'SELECT LOCATION' will open Google Maps at a fixed location. Address of place extracted from Google Maps data and stored in Places database.
153146
* [Capacitor Geolocation API](https://capacitor.ionicframework.com/docs/apis/geolocation) used to provide current location.
@@ -156,15 +149,15 @@ private getGoogleMaps(): Promise<any> {
156149
* [Google Cloud Storage](https://www.npmjs.com/package/@google-cloud/storage) used for storage of image data.
157150
* Auth tokens on the backend.
158151

159-
## Status & To-do list
152+
## :clipboard: Status & To-do list
160153

161-
* Status: working. Bookings can be made and new places added to offers page. If a different user is logged in they cannot book their own places (the booking button does not show) - which is correct. Camera images now show.
154+
* Status: working. Updated to latest Ionic & Angular versions.
162155
* To-do: Bookable place list is the same as the 'All Places' list - bookable places should not include the logged in users' places. 'My Offers' includes everyones places.
163156

164-
## Inspiration
157+
## :clap: Inspiration
165158

166159
[Acadamind Udemy Course: Ionic 4 - Build iOS, Android & Web Apps with Ionic & Angular](https://www.udemy.com/ionic-2-the-practical-guide-to-building-ios-android-apps/)
167160

168-
## Contact
161+
## :envelope: Contact
169162

170163
Repo created by [ABateman](https://www.andrewbateman.org) - feel free to contact me!

0 commit comments

Comments
 (0)