NPM Package @2sic.com/sxc-angular
@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:
provideSxc()to register the Angular HTTP client, 2sxc services, and the HTTP interceptor.SxcInitializerto initialize the current Dnn/2sxc module from the Angular root element.SxcAppfor typed content, query, and custom WebAPI calls.SxcContextfor the current page, module, edition,$2sxc, andsxcinstance.- Standalone toolbar directives for in-page editing.
Requirements
Version 22 requires:
- Angular 18 or newer
- RxJS 7 or newer
- A page where 2sxc loads
$2sxcbefore the Angular application starts
History
- 2015: First Angular integration.
- 2016-2020: Support for newer Angular versions, hot reloading, and improved Dnn context detection.
- 2021: Angular 11 support, toolbar refresh callbacks, and configurable Angular paths.
- 2022: Renamed from
@2sic.com/dnn-sxc-angularto@2sic.com/sxc-angularand updated for Angular 14. - 2024: Updated for Angular 18.
- 2025: Updated the template application for Angular 20.
- 2026: Version 22 introduced standalone providers/directives and the
SxcApp,SxcContext, andSxcInitializerAPIs documented here.
Note
Older examples using Data, Context, DnnAppComponent, SxcAppComponent, DnnSxcRootModule, SxcRootModule, or ContentManagerModule target earlier package versions and must be migrated.