From the course: Ionic 4.0 Essential Training

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Finalizing the home page design

Finalizing the home page design - Ionic Tutorial

From the course: Ionic 4.0 Essential Training

Start my 1-month free trial

Finalizing the home page design

we've made a lot of great progress. We created our service called activity service. We even went as far as creating our TypeScript data models with TypeScript interfaces. our API and have that data show up as parts of our design. Specifically you want to go to the tab1.page.ts file. This file represents the TypeScript class associated with the HTML of our tab1 page. The first thing we're going to go and do is create a constructor. The next thing we will also do is we need to create a property that will hold all of the data that we intend to consume with our service. a type called Observable Activity. I need to put an array 'cause I'm expecting an array of activities. Remember, I'm using Visual Studio Code you will need to manually import on line three as I have on my screen. We need to put activity instead to a-tivity. is to inject our service inside of this constructor. and then we need to give it a type, ActivityService. I'm going to hit Enter. And as you can see on line four, I…

Contents