From the course: Angular: Progressive Web Apps

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Creating the business logic classes

Creating the business logic classes - Angular Tutorial

From the course: Angular: Progressive Web Apps

Creating the business logic classes

- [Instructor] We will start coding the business logic classes. For that, in our project, we will find all the code that we are writing in the source folder, src. Within there we already have some sub folders and also some files. Well, now I will get into the app, and within the app I'm going to create a new folder. So right click, new folder. I'm going to call this folder logic. Now I'm going to open that folder, so be careful, because now you will see the arrow is actually pointing down. That means it's open. Then I can create new files here. For example, I can start with the file TastingRating.ts, ts for TypeScript. So in this case, this is going to be the class that will represent one tasting rating. So it's going to be a class that we are going to export. So export class TastingRating curly braces. And then we will have a couple of properties with a default value of zero. So for example, the rating for…

Contents