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
**general** all operators return observables. You have to subscribe to observables.
29
+
28
30
**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).
29
31
30
32
**of** used with a single value for an 'emit once and complete' stream.
@@ -33,11 +35,23 @@ Code taken from course.
33
35
34
36
**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.
35
37
36
-
**map** passes each source value through a transformation function then outputs the results, e.g map(x => 10*x)
38
+
**map** transforms things. It passes each source value through a transformation function then outputs the results, e.g map(x => 10*x).
39
+
40
+
**pipe** composes operators. Creates a pipeline of small reusable operators like map and filter.
41
+
42
+
**from** converts a mix of other objects and data types into Observables
43
+
44
+
## Ionic Controllers Used
45
+
46
+
*[Alert Controller](https://ionicframework.com/docs/api/alert) alert appears on top of app contents.
47
+
48
+
*[Loading Controller](https://ionicframework.com/docs/api/loading) overlay used to display activity and block user input. Loading indicators can be created, including spinners.
37
49
38
50
## Observables
39
51
40
-
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. Sbscribers should be wrapped in try/catch blocks.
52
+
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.
53
+
54
+
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.
41
55
42
56
## Array Operators
43
57
@@ -58,6 +72,7 @@ An [observable](https://rxjs-dev.firebaseapp.com/guide/observable) is created us
*[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.
129
144
*[Capacitor Geolocation API](https://capacitor.ionicframework.com/docs/apis/geolocation) used to provide current location.
130
145
*[Capacitor Camera API](https://capacitor.ionicframework.com/docs/apis/camera) used to provide camera functionality.
131
-
*[Firebase Auth API](https://firebase.google.com/docs/reference/rest/auth) used to control access to app.
132
-
*[Cordova Local Storage](https://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#localstorage) to save user user authentication token so a refresh etc. does not lose a user's settings.
146
+
*[Fapacitor Local Storage](https://capacitor.ionicframework.com/docs/apis/storage/) API provides a key-value store for simple data. Used to save user authentication token so a refresh etc. does not lose a user's settings.
133
147
*[Google Cloud Storage](https://www.npmjs.com/package/@google-cloud/storage) used for storage of image data.
0 commit comments