Angular : Model

I love learning about technology and sharing that with others
introduction
model is used when we want to define custom type of the data,
here the model name is Post has three attributes two are compulsory and one is not compulsory.
export interface Post {
title:string;
content:string;
id?:string;
}
``
### How to use model ?
-here we are saying that the post data is of type Post.
onCreatePost(postData: Post) { this.http.post('https://ngfirstproject-default-rtdb.asia-southeast1.firebasedatabase.app/posts.json', postData ).subscribe( responseData=> { console.log(responseData) } ) } ```

