npm yarn run start) as well as the webpack build (
npm yarn run watch:dev)
- Keep adaptability in mind. An institution installing DSpace will often want to modify a few things about the UI. The easier we can make that, the better. Therefore keep your components small (divide them in to sub-components), make sub-modules for coherent functionality, use SASS variables, etc.
We agreed to remove the concept of Communities from the UI. They should be called Collections as well. The decision to remove the concept of Communities from the UI was reversed in the meeting of April 13th
In the component I specify
collection$. The dollar is a convention to indicate an observable
In the OnInit:
this.collection$ = this.cds.findAll();
And then in the template, handle the different cases: dedicated messages for
hasFailedand the actual data for
of course in a more realistic scenario you might send the error to a notification service instead of handling it yourself
In the template I use an
asyncpipe to unwrap the observable: every time the observable changes the contents of this block will be re-rendered, and
collectionRDwill have the latest value
The question marks check for null or undefined: the rest of the statement won't be executed unless that variable before the question mark has a value.