Table of Contents

NPM Package @2sic.com/sxc-angular

you are here (click to zoom) - discover the stack

@2sic.com/sxc-angular connects a modern Angular application to Dnn and 2sxc.

@2sic.com/dnn-sxc-angular is end-of-life. Use @2sic.com/sxc-angular for all new and upgraded applications.

Install it from npm, then follow the installation and bootstrap guide.

The library provides:

  1. provideSxc() to register the Angular HTTP client, 2sxc services, and the HTTP interceptor.
  2. SxcInitializer to initialize the current Dnn/2sxc module from the Angular root element.
  3. SxcApp for typed content, query, and custom WebAPI calls.
  4. SxcContext for the current page, module, edition, $2sxc, and sxc instance.
  5. Standalone toolbar directives for in-page editing.

Requirements

Version 22 requires:

  • Angular 18 or newer
  • RxJS 7 or newer
  • A page where 2sxc loads $2sxc before the Angular application starts

History

  1. 2015: First Angular integration.
  2. 2016-2020: Support for newer Angular versions, hot reloading, and improved Dnn context detection.
  3. 2021: Angular 11 support, toolbar refresh callbacks, and configurable Angular paths.
  4. 2022: Renamed from @2sic.com/dnn-sxc-angular to @2sic.com/sxc-angular and updated for Angular 14.
  5. 2024: Updated for Angular 18.
  6. 2025: Updated the template application for Angular 20.
  7. 2026: Version 22 introduced standalone providers/directives and the SxcApp, SxcContext, and SxcInitializer APIs documented here.
Note

Older examples using Data, Context, DnnAppComponent, SxcAppComponent, DnnSxcRootModule, SxcRootModule, or ContentManagerModule target earlier package versions and must be migrated.