issues
search
web-dave
/
angular-essentials-workshop
2
stars
0
forks
source link
Create a custom type
#12
Open
web-dave
opened
2 years ago
web-dave
commented
2 years ago
Take a look at one Book Object
Link
Generate a interface
Book
and define it
Use this interface as a type whenever we handle Books
web-dave
commented
2 years ago
generate
```bash ng g interface books/iBook ```
usage
```ts books: IBook[]; @Input() book: IBook; ``` ```ts getBooks() { const url = this.restRoot; return this.http.get
(url); } ```
web-dave
commented
2 years ago
Next
Book
and define it