Front End Developer (AngularJS) Question: Download Questions PDF
Explain me how MVC is represented in AngularJS?
![Front End Developer (AngularJS) Interview Answer Front End Developer (AngularJS) Interview Question](https://globalguideline.com/public/images/interview/4.png)
Answer:
Mode-View-Controller (MVC) is a design pattern. It can be represented in AngularJS framework as follow:
Model: Model in AngularJS is just a JavaScript object which contains properties either primitive such as string, integer, Boolean, array or complex type object. Its main responsibility to hold data that come from controller or service. Some time it also contains business logic which related to view.
View: It’s just a plain HTML page with embedded AngularJS directives and expression. In AngularJS we mainly represent model data through view.
Controller: It’s a JavaScript function which main responsibility to bind model data to view and vise-versa. It can also contains business logic through which it determine which model goes to which view. Controller also responsible for bind model data that come http request or other services.
Model: Model in AngularJS is just a JavaScript object which contains properties either primitive such as string, integer, Boolean, array or complex type object. Its main responsibility to hold data that come from controller or service. Some time it also contains business logic which related to view.
View: It’s just a plain HTML page with embedded AngularJS directives and expression. In AngularJS we mainly represent model data through view.
Controller: It’s a JavaScript function which main responsibility to bind model data to view and vise-versa. It can also contains business logic through which it determine which model goes to which view. Controller also responsible for bind model data that come http request or other services.
Download Front End Developer (AngularJS) Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell me in CoffeeScript how clone-function is useful? | Tell me what is a Thread-Local object in Python Flask? |