cryptobot-interface > LiveViewComponent
OnDestroy
OnInit
- activatedRouter
- busySubscription
- chart
- chartDataSubscription
- chartReady
- gdaxDataService
- isBusy
- pathState
- router
- urlSubscription
⊕ new LiveViewComponent(activatedRouter: ActivatedRoute
, router: Router
, gdaxDataService: GdaxDataService): LiveViewComponent
Defined in app/components/live-view/live-view.component.ts:47
Constructor for the class. Injects Angular's ActivatedRoute, Router, and GdaxDataService services
Parameters:
Param | Type | Description |
---|---|---|
activatedRouter | ActivatedRoute |
Angular's ActivatedRoute service for knowing current route |
router | Router |
Angular's Router service for changing route |
gdaxDataService | GdaxDataService | Internal service to get queried market data. |
Returns: LiveViewComponent
● activatedRouter: ActivatedRoute
Defined in app/components/live-view/live-view.component.ts:56
Angular's ActivatedRoute service for knowing current route
● busySubscription: Subscription
Defined in app/components/live-view/live-view.component.ts:20
Makes unsubscribing from this variable possible in OnDestroy
● chart: Chart
Defined in app/components/live-view/live-view.component.ts:25
The main chart object to be constructed whenever new data is returned from the service.
● chartDataSubscription: Subscription
Defined in app/components/live-view/live-view.component.ts:29
Makes unsubscribing from this variable possible in OnDestroy
● chartReady: boolean
= false
Defined in app/components/live-view/live-view.component.ts:33
Flag to prevent chart compilation until after chart is created.
● gdaxDataService: GdaxDataService
Defined in app/components/live-view/live-view.component.ts:58
Internal service to get queried market data.
● isBusy: boolean
= true
Defined in app/components/live-view/live-view.component.ts:38
Checks with service to see if it's busy in a query, and puts table in standby mode until it's ready.
● pathState: string
= "BTC-USD"
Defined in app/components/live-view/live-view.component.ts:43
The initial path state passed in by the activatedRouter. Keeps track of what currency the chart should be viewing.
● router: Router
Defined in app/components/live-view/live-view.component.ts:57
Angular's Router service for changing route
● urlSubscription: Subscription
Defined in app/components/live-view/live-view.component.ts:47
Makes unsubscribing from this variable possible in OnDestroy
► ngOnDestroy(): void
Defined in app/components/live-view/live-view.component.ts:64
Returns: void
► ngOnInit(): void
Defined in app/components/live-view/live-view.component.ts:84
Triggered when component is loaded, but before it is viewed. Gets REST path info, and updates the profit chart.
Returns: void
► updateChart(data: number
[][]): void
Defined in app/components/live-view/live-view.component.ts:102
When new data is received, it's passed to this function. Here the chart details assembled, and the chartReady flag is released.
Parameters:
Param | Type | Description |
---|---|---|
data | number [][] |
queried market data passed from the GdaxDataService. |
Returns: void