July 2019
Intermediate to advanced
416 pages
10h 6m
English
It's all very well us being able to save the pins to the database, but we also need a way to represent the pins on the map so that we can show them during the map session and move them as needed. This class will also act as the connection to the data service. The class that we are going to write will demonstrate a neat little trick introduced in TypeScript 3, called rest tuples, and starts off as follows:
export class PinsModel { private pins: PinModelData[] = []; constructor(private firebaseMapService: FirebaseMapService) { }}
The first feature we are going to introduce deals with adding the data for a pin when the user clicks on the map. The signature for this method looks a little bit strange, so we'll take a ...
Read now
Unlock full access