# Angular





Angular CLI projects output to `dist/<project-name>/browser` (Angular 17+) or `dist/<project-name>` (older versions).

Deploy [#deploy]

<Steps>
  <Step>
    Build your project [#build-your-project]

    ```bash
    ng build --configuration production
    ```
  </Step>

  <Step>
    Deploy to Sample.app [#deploy-to-sampleapp]

    You need to specify the output directory since Angular uses a nested path:

    ```bash
    samplex deploy ./dist/my-app/browser
    ```

    For Angular versions before 17:

    ```bash
    samplex deploy ./dist/my-app
    ```
  </Step>
</Steps>

<Callout type="warn">
  Angular's output directory includes the project name, so auto-detection won't find it. Always
  specify the path explicitly.
</Callout>

Angular Router [#angular-router]

If you're using Angular Router with `PathLocationStrategy` (the default), Sample.app's SPA fallback handles it automatically.

If you're using `HashLocationStrategy`, it also works since all routes stay on the same page.

Base href [#base-href]

If you need to serve your app from a subpath, set the base href at build time:

```bash
ng build --base-href /my-subpath/
```
