Model is a container used for passing data between different components in our application. The controller class can add data to the model in the form of strings, numbers, or objects etc. The view page is able to access data placed in the model.

In this lesson, we will first pass the model to our controller class, then add some data to it and finally show how the data in the model is accessed in the view page.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.