Click here to Skip to main content
15,878,959 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
In a Front End web app(MVC) in javascript what components should be there and how should components communicates with each other.
What extra things required other than model ,view and controller.
Posted

1 solution

Front-end component in MVC web app - may javascripts, jquery, angular etc. all are based on script files and they are placed within a folder within your project and are referenced in the pages either via .Layout.cshtml page or they can be referenced with a particular page by putting the source location in the page.

If you have a lot of custom scripts files and they are related to each other, then you need to put them (reference) in a order how they will function, i.e. if file2.js is required by file1.js then put the reference of file2.js in file1.js.

In MVC framework, for front-end nothing extra stuff to be done with model, controller or view. All the scripts and services (angular) should be placed in the view in a order so that relationship between the files are maintain in accordance with their definitions.

Hope this will help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900