November 2019
Beginner
804 pages
20h 1m
English
We first need to create our ChartDetails model class. Create a file called chart-details.intf.ts inside src/views.
Here's the implementation:
import {DataPoint} from "../domain";
export interface ChartDetails {
chartType: string;
data: DataPoint[];
dataLabel: string;
title: string;
xAxisLabel: string;
yAxisLabel: string;
}
We have used an interface here and not a class because this model element is a simple Value Object (VO), also called a Data Transfer Object (DTO). It will only be created and used to transfer information from the controller back to our view and we don't need any ...
Read now
Unlock full access