We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
1.
Initial Load (Server-Side Rendering)
First Request: When the client (e.g., a browser) makes the initial request for a page, the server will render that specific page (route) on the server, generate the HTML, and send it back to the client. This HTML contains all the data and content for that specific route. Pre-rendered HTML: This initial page is fully pre-rendered by the server, so the client sees the content immediately without needing to wait for Angular's JavaScript to fully bootstrap on the client side. 2. Client-Side Navigation (Single-Page Application Mode) Subsequent Navigations: Once the initial HTML is loaded and Angular has bootstrapped (i.e., after Angular's JavaScript runs on the client), Angular handles the routing and navigation on the client-side, just like in a regular Angular application. This means that after the first load, the navigation between routes happens on the client, without sending additional requests to the server for rendering new pages. o This makes your app behave like a Single Page Application (SPA) after the initial server-side rendering. o Subsequent page transitions are handled by Angular on the client, and only the data that changes (if any) is fetched through API calls, not the entire HTML of each new page. 3. Server-Side Rendering on Every Request (Optional) New Requests: If a user refreshes the page or directly navigates to a new URL by entering it in the browser's address bar, the server will render that specific route's HTML again and send it to the client. SEO Crawlers: Search engines like Google crawling your site will always hit the server, which means the server will pre-render each page and provide fully rendered HTML for every route, improving SEO.