← Back to blog

Understanding Sitecore JSS Architecture with Angular: A Complete Guide

2026-09-08

Modern web applications are moving toward headless architectures where content management and frontend presentation are separated.

Sitecore JSS allows developers to build frontend applications using modern JavaScript frameworks while Sitecore continues to manage content, layouts, renderings, personalization, and publishing.

For Angular developers, however, one of the biggest challenges is understanding what actually happens between a user requesting a page and Angular rendering Sitecore components.

Questions such as these are very common:

  • How does Angular know which Sitecore component to render?
  • Where does the page layout come from?
  • What exactly does the Sitecore Layout Service return?
  • How do placeholders work?
  • How does routing connect to Sitecore content?
  • Where does GraphQL fit into the architecture?

In this article, we will walk through the complete Sitecore JSS + Angular architecture and follow the flow from a browser request to the final rendered page.

1. The Big Picture

At a high level, a Sitecore JSS Angular application looks like this:

Browser
  • Angular Application
JSS Data Layer
  • REST / GraphQL
Request Page Data
Sitecore
  • Routes
  • Layouts
  • Placeholders
  • Renderings
  • Datasource Content
JSON / GraphQL Response
Angular Components

The important concept is this:

Sitecore decides what content and components belong on the page, while Angular is responsible for rendering those components in the browser.

The Sitecore Layout Service exposes layout information as structured JSON, allowing a decoupled frontend to consume the page structure and component data. JSS can retrieve this data through REST or GraphQL-based approaches.

2. Traditional Sitecore vs Headless Sitecore

Before understanding JSS, it helps to compare traditional Sitecore rendering with a headless approach.

Traditional Architecture

Browser
Sitecore
  • Content
  • Rendering
  • Razor Views
  • HTML
Browser (receives final HTML)

In a traditional architecture, Sitecore manages both:

  • Content
  • HTML rendering

The browser receives the final HTML.

Headless Architecture with Angular

Browser
Angular Application
Fetch Content + Layout
Sitecore APIs
  • Content
  • Route
  • Layout
  • Component Data
JSON / GraphQL Response
Angular Renders UI

Here, the responsibilities are separated.

SitecoreAngular
Content managementUI rendering
Page structureComponents
RenderingsStyling
PlaceholdersUser interaction
DatasourcesApplication behavior
PublishingFrontend presentation

This separation is one of the core ideas behind Sitecore JSS.

3. The Main Building Blocks

To understand the architecture, let's look at the major pieces involved.

Sitecore Item
Sitecore Route
Layout
Placeholder
Rendering
Angular Component

Let's explore each layer.

3.1 Sitecore Content Item

A Sitecore item contains content.

For example:

  • Home
    • Hero Title“Welcome to Our Website”
    • Hero Description“We build modern digital experiences.”
    • CTA Text“Learn More”

Angular should not need to know where this content is stored in the Sitecore tree.

Instead, Angular receives structured data.

For example:

{
  "fields": {
    "Title": {
      "value": "Welcome to Our Website"
    },
    "Description": {
      "value": "We build modern digital experiences."
    },
    "CTA": {
      "value": "Learn More"
    }
  }
}

This keeps the frontend focused on rendering instead of directly accessing the Sitecore content database.

4. What Is the Sitecore Layout Service?

The Layout Service is one of the most important concepts in Sitecore headless development.

It provides information about:

  • The current route
  • The layout
  • Placeholders
  • Components assigned to those placeholders
  • Datasource content
  • Context information

For example, imagine a page with this structure:

  • Home Page
    • main
      • Hero
      • Content Block
      • Promo Banner

The Layout Service can return this information in a structured response.

A simplified response might look like this:

{
  "sitecore": {
    "route": {
      "name": "home",
      "placeholders": {
        "main": [
          {
            "componentName": "Hero",
            "fields": {
              "Title": {
                "value": "Welcome"
              }
            }
          },
          {
            "componentName": "ContentBlock",
            "fields": {
              "Content": {
                "value": "This is the content."
              }
            }
          }
        ]
      }
    }
  }
}

The Layout Service is designed to expose Sitecore layout information as JSON and can be consumed by decoupled frontend applications.

5. The Complete Request Flow

Now let's follow the complete flow.

Suppose a user opens:

https://example.com/products

The architecture flow can be represented as follows:

1Browser Request
2Angular Router
3JSS Route Resolution
4Layout Service Request
5Sitecore Finds Route
6Sitecore Resolves
  • Layout
  • Placeholders
  • Renderings
  • Datasources
7Layout Data Returned
8Angular Placeholder
9Component Mapping
10Angular Components Render

Let's break this down further.

Step 1: Angular Receives the Route

A user opens:

/products

Angular needs to determine what to display.

A normal Angular application might define routes like this:

const routes: Routes = [
  {
    path: 'products',
    component: ProductsComponent
  }
];

However, a Sitecore application can have a large number of routes managed directly from Sitecore.

For example:

  • Sitecore Routes
    • /
    • /about
    • /products
      • /products/product-a
      • /products/product-b
    • /services
    • /contact

Hardcoding every Sitecore route inside Angular would not be practical.

This is where JSS dynamic routing becomes important.

The Angular JSS sample uses routing based on route data from the Layout Service, allowing Sitecore-managed routes to drive page rendering.

Conceptually:

Angular URL
JSS Route Resolver
Determine Sitecore Route
Request Layout Data

Step 2: Sitecore Resolves the Page

Once Sitecore receives the route information, it identifies the requested item.

For example:

/products

Could map to:

/sitecore/content/MyWebsite/Home/Products

Sitecore then determines:

  • Products Page
    • Layout
    • main Placeholder
      • ProductHero
      • ProductList
      • CTA
    • footer Placeholder
      • Footer

The result is sent to the Angular application as layout data.

Step 3: Angular Receives the Layout Data

Now Angular receives information similar to:

{
  "route": {
    "name": "products",
    "placeholders": {
      "main": [
        {
          "componentName": "ProductHero"
        },
        {
          "componentName": "ProductList"
        },
        {
          "componentName": "CTA"
        }
      ]
    }
  }
}

At this point, Angular knows something important:

Sitecore wants three components to appear inside the main placeholder.

But Angular still needs to answer:

What Angular component should render ProductHero?

That is where component mapping comes in.

Step 4: Component Mapping

Imagine Sitecore returns:

{
  "componentName": "Hero"
}

Angular needs to map that Sitecore rendering to an Angular component.

Conceptually:

Sitecore Rendering
"Hero"
Component Mapping
HeroComponent

For example:

const components = {
  Hero: HeroComponent,
  ContentBlock: ContentBlockComponent,
  PromoBanner: PromoBannerComponent
};

Or, depending on the JSS Angular implementation, components can be registered with JSS infrastructure.

For example:

import { JssModule } from '@sitecore-jss/sitecore-jss-angular';

JssModule.withComponents([
  {
    name: 'Hero',
    type: HeroComponent
  },
  {
    name: 'ContentBlock',
    type: ContentBlockComponent
  }
]);

The JSS infrastructure uses component registration or a component factory pattern to associate Sitecore rendering names with frontend implementations.

This mapping is extremely important.

If Sitecore contains:

Hero

But Angular does not have a corresponding mapping, the application cannot render that component correctly.

Step 5: Placeholders Render Components

Placeholders are the bridge between the Sitecore page structure and Angular components.

Imagine this Sitecore structure:

  • Home Page
    • main Placeholder
      • Hero
      • Content Block
      • Promo Banner

In Angular, a JSS placeholder can look like this:

<sc-placeholder
  name="main"
  [rendering]="route">
</sc-placeholder>

The placeholder receives route data.

Then the JSS infrastructure dynamically determines which components should be rendered.

Conceptually:

<sc-placeholder>
Layout Data
HeroHeroComponent
ContentBlockContentBlockComponent
PromoBannerPromoBannerComponent

The sc-placeholder component in JSS for Angular dynamically renders components based on rendering data returned from Sitecore.

6. Creating a Simple JSS Angular Component

Let's create a simple Hero component.

hero.component.ts

import { Component, Input } from '@angular/core';
import { ComponentRendering } from '@sitecore-jss/sitecore-jss-angular';

@Component({
  selector: 'app-hero',
  templateUrl: './hero.component.html'
})
export class HeroComponent {
  @Input() rendering!: ComponentRendering;
}

The component receives rendering data.

hero.component.html

<section class="hero">
  <h1>
    {{ rendering.fields?.Title?.value }}
  </h1>

  <p>
    {{ rendering.fields?.Description?.value }}
  </p>
</section>

The data flow is:

Sitecore Datasource
Layout Service
Rendering Data
HeroComponent
Angular Template

This is one of the main architectural differences between a regular Angular application and a Sitecore JSS application.

In a regular application, developers often directly control component instantiation.

With JSS, components are typically driven by the Sitecore layout data and dynamically associated with the corresponding frontend implementation.

7. Understanding the Data Flow

Let's visualize the full content flow.

Sitecore CMS
  • Content
  • Templates
  • Datasources
  • Renderings
  • Placeholders
Layout Data
Layout API / GraphQL
  • Route
  • Placeholders
  • Component Names
  • Fields
Angular JSS Layer
  • Routing
  • JSS Context
  • Component Mapping
  • Placeholder Rendering
Angular Components
  • Hero
  • Content Block
  • Product List
  • Footer

8. Where Does GraphQL Fit In?

Sitecore JSS applications can retrieve layout and content data using REST or GraphQL.

For GraphQL-based applications, the JSS data layer can use the GraphQL Layout Service to retrieve layout information. Sitecore also supports GraphQL querying for layout and dictionary-related data in JSS applications.

The architecture becomes:

Angular
GraphQL Client
GraphQL Endpoint
Sitecore Content + Layout
GraphQL Response
Angular Components

A simplified GraphQL query might look like:

query GetPage {
  item(path: "/sitecore/content/MyWebsite/Home") {
    name
    fields {
      name
      value
    }
  }
}

For JSS applications, GraphQL can also be used for layout data rather than manually creating a query for every page.

For example:

import { GraphQLLayoutService } from '@sitecore-jss/sitecore-jss';

export const layoutService = new GraphQLLayoutService({
  clientFactory,
  siteName: config.sitecoreSiteName
});

The application can then fetch layout data through the configured service.

const data = await layoutService.fetchLayoutData('en');

The exact configuration depends on the Sitecore and JSS version being used, so it is important to follow the SDK documentation for your project version.

9. REST vs GraphQL

Both approaches can be useful.

REST Layout ServiceGraphQL
Traditional API approachFlexible query approach
JSON responseQuery-based response
Simple setupMore control over requested data
Layout Service endpointLayout, dictionary and other supported GraphQL scenarios
Good for straightforward implementationsUseful for modern headless architectures

The JSS Layout API abstracts data fetching and supports REST and GraphQL endpoint options, including Experience Edge-related GraphQL delivery scenarios.

My recommendation is:

  • Understand the REST Layout Service first.
  • Learn how layout data is structured.
  • Then move to GraphQL.
  • Use GraphQL when its flexibility and delivery architecture provide a clear benefit.

Understanding the architecture is more important than choosing a technology simply because it is newer.

10. A Practical Example

Let's imagine we have this page:

  • Home
    • main
      • Hero
      • FeatureList
      • PromoBanner

Step 1: Sitecore defines the page

  • Home
    • main Placeholder
      • Hero
      • FeatureList
      • PromoBanner

Step 2: Layout Service returns data

{
  "placeholders": {
    "main": [
      {
        "componentName": "Hero",
        "fields": {
          "Title": {
            "value": "Welcome"
          }
        }
      },
      {
        "componentName": "FeatureList"
      },
      {
        "componentName": "PromoBanner"
      }
    ]
  }
}

Step 3: Angular receives the route

export class LayoutComponent {
  route: any;
}

Step 4: Angular renders the placeholder

<sc-placeholder
  name="main"
  [rendering]="route">
</sc-placeholder>

Step 5: JSS maps components

HeroHeroComponent
FeatureListFeatureListComponent
PromoBannerPromoBannerComponent

Step 6: Angular renders the final page

example.com

Hero

Welcome to Site

Feature List

  • ✓ Fast
  • ✓ Scalable
  • ✓ Flexible

Promo Banner

Learn More →

11. Suggested Angular Project Structure

For a maintainable Sitecore JSS Angular application, I recommend organizing the application clearly.

  • src
    • app
      • components
        • hero
          • hero.component.ts
          • hero.component.html
          • hero.component.scss
        • content-block
        • promo-banner
      • services
        • sitecore-data.service.ts
        • graphql.service.ts
      • routing
        • routing.module.ts
      • shared
      • app.module.ts
    • environments
    • assets

The exact generated structure can vary by JSS version, but the key principle remains the same:

Keep Sitecore integration, business logic, and UI components clearly separated.

For larger projects, I recommend the following approach:

Angular ApplicationComponentsServicesSharedSitecore LayerRESTGraphQLSitecore

A component should primarily focus on:

  • Receiving data
  • Displaying data
  • Handling UI interaction

For example:

@Component({
  selector: 'app-product-card'
})
export class ProductCardComponent {
  @Input() rendering: any;
}

Avoid placing large amounts of Sitecore-specific API logic directly inside every component.

Instead:

Component
Service
Sitecore / GraphQL API

This makes the application easier to test and maintain.

13. Common Mistakes

Mistake 1: Treating JSS Like a Normal Angular App

A normal Angular application might manually define all page components.

A JSS application is different because the page composition can come from Sitecore.

Instead of:

  • Angular
    • decides every page component

Think:

  • Sitecore
    • decides page composition
  • Angular
    • renders the mapped components

Mistake 2: Putting API Calls Inside Every Component

Avoid:

HeroComponent
API Call
ProductComponent
API Call
BannerComponent
API Call

Prefer:

Component
Application / Data Service
Sitecore API

Mistake 3: Not Understanding Placeholders

A placeholder is not just a container in HTML.

In JSS, it represents a connection between:

Sitecore Page Structure
Layout Data
Angular Rendering

Understanding placeholders makes debugging much easier.

Mistake 4: Component Name Mismatches

If Sitecore sends:

ProductHero

But Angular registers:

HeroComponent

Without a correct mapping, the rendering cannot be resolved.

Always verify:

Sitecore Rendering Name=Angular JSS Registration

14. Debugging the Architecture

When a component does not render, I recommend following this flow.

Component Not Visible
Is the component added in Sitecore?
Is it inside the correct placeholder?
Does Layout Service return it?
Is the component name correct?
Is Angular component mapping available?
Does the component receive rendering data?
Check Angular console

This simple flow can save a significant amount of debugging time.

15. The Most Important Architecture Concept

If you remember only one thing from this article, remember this:

Sitecore
Decides
WHAT should appear
Layout Data
Angular
Decides
HOW it should appear

Sitecore controls the content and composition.

Angular controls the frontend experience.

That separation is the foundation of the Sitecore JSS architecture.

Conclusion

Sitecore JSS with Angular can initially feel complicated because multiple systems work together:

  • Angular routing
  • JSS routing
  • Sitecore routes
  • Layout Service
  • Placeholders
  • Renderings
  • Component mapping
  • REST or GraphQL delivery

However, once the request flow is understood, the architecture becomes much easier to work with.

The complete flow can be summarized as:

User Request
Angular Routing
JSS Route Resolution
Sitecore Route
Layout Service / GraphQL
Layout JSON
Placeholder
Component Mapping
Angular Components
Final Page

Understanding this flow is essential before moving into more advanced topics such as:

  • Sitecore GraphQL
  • Experience Edge
  • XM Cloud
  • Integrated GraphQL
  • Personalization
  • Multi-site architecture
  • Performance optimization
  • Component-driven design

In the next article, I will go deeper into one of the most important parts of this architecture: