How to generate models


#1

Hi everyone!

I’m developing an ionic 2 application related with sports.
I want to define sport model. An sport would have a name, an icon, some images and a short description (for example).

I looked in the documentation and there is no information about it.

I’m able to develop pipes, providers and custom components but not models.

Can anybody help me, please?

Thanks in advance!!


#2

You can use TypeScript interface to define objects boilerplate
https://www.typescriptlang.org/docs/handbook/interfaces.html


#3

Thanks @bobrov1989!

I will try it.


#4

Let me know if something going wrong for your)