The bid module
We are going to close our chapter with the bid
module, as we used many of its components in the previous auction
module. Only the bid listing
will be discussed, as it implies working with the underlining socket stream.
Listing bids
From the previous AuctionDetailComponent
, we can see that this component will have the bids as input. This data comes from the auction
entity, which holds previously placed bids.
Create a new file called public/src/bid/components/bid-list.component.ts
:
import { Component, OnInit, OnDestroy } from 'angular2/core'; import { BidService } from '../bid.service'; import { Bid } from '../bid.model'; import { BidComponent } from './bid.component'; @Component({ selector: 'bid-list', inputs: ['bids'], directives: [BidComponent], ...
Get MEAN Blueprints 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.