---
title: "Getting started"
slug: "getting-started"
abstract: "Learn how to get started with the Angular implementation of the Content SDK."
---
# Getting started

Content SDK for Angular brings the enhancements provided by SitecoreAI to your Angular website. Version 1.0 includes the following features:

- Server-side rendering and route data fetching with [loaders](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/loaders.html).
- Components and field rendering, including the [`scImage` directive](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/image-component-and-parameters.html).
- [Pages editing and preview support](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/editor-integration-using-metadata.html).
- Internationalization and [multi-site support](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/the-sitecore-configuration-file.html).
- Analytics, event tracking, personalization, and [lightweight tracking](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/lightweight-tracking.html).
- Express middleware for [bot tracking](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/angular-middleware.html#bot-detection-middleware), [redirects](https://doc.sitecore.com/sai/en/developers/content-sdk/angular/1x/angular-middleware.html#redirects-middleware), and sitemap and `robots.txt` generation.
- Deployment to SitecoreAI as an editing host.

## Creating a Content SDK Angular app

You can scaffold the new app with the latest version of the create-content-sdk-app package:

1. Run the following command:

    ```shell
    npx create-content-sdk-app@latest
    ```

2. When prompted to choose a template, choose `angular`.

You can also provide the following command to create an app directly:

```shell
npx create-content-sdk-app@latest angular --destination <your-destination-path> --yes
```

Once completed, you get a sample app based on Angular 21, with ready-made components based on the Skate Park SitecoreAI site.

### Connecting the app to SitecoreAI

To connect your application to SitecoreAI, you need to provide the Edge context ID and the default site name for your deployment. You can provide them either through the `sitecore.config.ts` file, or via environment variables. The following variables are required for the connection:

```shell
SITECORE_EDGE_CONTEXT_ID
CSDK_PUBLIC_SITECORE_EDGE_CONTEXT_ID
CSDK_PUBLIC_DEFAULT_SITE_NAME
```

### Starting the app

If you need to build your Content SDK Angular application, you can use the following command:

```shell
npm run build
```

To start the app in development and pre-production environments, use:

```shell
npm run dev
```

To start the app in production environments, use:

```shell
npm run start
```

## Deploy a project to SitecoreAI

See [Deploy a project and environment](https://doc.sitecore.com/sai/en/developers/sitecoreai/getting-started-with-sitecoreai/deploy-a-project-and-environment.html) for more information on deploying a project to SitecoreAI through the Deploy app. Before you deploy, you must add the following environment variables as the Deploy app is currently being set up to support Angular out-of-the-box:

```shell
CSDK_PUBLIC_SITECORE_EDGE_CONTEXT_ID=<YOUR_EDGE_CONTEXT_ID>
CSDK_PUBLIC_DEFAULT_SITE=<YOUR_SITE_NAME>
CSDK_PUBLIC_DEFAULT_LANGUAGE=<YOUR_LANGUAGE>
NG_TRUST_PROXY_HEADERS=X-FORWARDED-PORT,X-FORWARDED-PATH,X-FORWARDED-FOR,X-FORWARDED-HOST,X-FORWARDED-PROTO
NG_ALLOWED_HOSTS=*.sitecorecloud.io
```