Creating the bike-detail methods

Let's create the bike-detail component:

  1. Open ./Client/src/pages/bikes/bike-detail/bike-detail.component.ts and add the following imports, right after the core import:
 import { ActivatedRoute } from  '@angular/router';

 // App imports
 import { Bike } from  '../bike';
 import { BikesService } from  '../_services/bikes.service';
 import { AuthService } from  '../../auth/_services/auth.service';
 import { User } from  './../../auth/user';
  1. Add the following properties after the BikeDetailComponent class declaration:
 bike: Bike; isLoading: Boolean = false; userVote: number; builders: Array<Object> = [ {id: 1, name: 'Diamond Atelier'}, {id: 2, name: 'Deus Ex Machina\'s'}, {id: 3, name: 'Rough Crafts'}, {id: 4, name: ...

Get Hands-On Full Stack Web Development with Angular 6 and Laravel 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.