Today I have learned new file in javascript

 ROUTING

A router is a JavaScript object that maps URLs to functions. The router calls a function based on the URL.

In the past, a web application was a series of interconnected pages. This could either be static pages or dynamic pages that are generated on the server.

A single-page web application was a new concept where the app’s life span revolved around a single HTML document.

Web pages were then replaced by views. In most web frameworks, links are no longer used to generate and navigate between pages, instead, they are bound to views.

A view is a JavaScript object that contains the logic for a single web page. The view handles page rendering and user input. All views are controlled by the router.

EXAMPLE:


                                     OUTPUT:
                            



Comments

Popular posts from this blog

Building a Full-Stack Student Management System with React.js and NestJS

Today I have solved the problem in javascript

Today I have solved problem in javascript