November 2019
Beginner
804 pages
20h 1m
English
The first method that we can add from the previous version of MediaManControllerImpl is reloadBookCollections(): void.
Here's the code that you can add for it:
reloadBookCollections(): void {
this.getMediaCollectionIdentifiersList().then(keys => {
this._bookCollections.clear(); // clear the current state
keys.forEach(key => {
this.loadMediaCollection(key).then(collection => {
this._bookCollections.set(key, collection);
});
});
});
}
Notice that now we are extending from MediaService, we have removed the this._bookService. prefix and replaced it with this. in order to call the method from the parent MediaService class.
Also, since we manage the view with an Angular template, we don't need to call any ...
Read now
Unlock full access