Dialog Component — Angular (5) | Message Model

Thiago Bernardes
Dialog Component Angular (5)
1 min readJan 21, 2018

So up to now, we have the Dialog Component ready to be consumed. As per our previous articles, you might noticed that I like to organise the code to make it as cleared as possible, so for the Message Service we are going to do the same. Let's start to create the Models, which will support the message component and the service.

The MessageTypeEnum is an enumerator that will define the type of the message:

./src/app/message/message-type.enum.ts

The MessageModel is the one responsible for the Dialog Content. On this example we will only send to the component the property message, but you can extend it to send Title, Buttons and so on…

So let's move to the Message Component on the next article.

<< Previous = MENU = Next >>

--

--

Thiago Bernardes
Dialog Component Angular (5)

Focused on Human-Centered Design & working collaboratively with different areas, I combine the IT background with UX experience to create innovative solutions