NPM Package @2sic/dnn-sxc-angular
We've created a library to help you connect Angular with Dnn called dnn-sxc-angular.
You can find it here: dnn-sxc-angular on Npm.
To start, you should learn how to install.
The library contains the following bits of magic to get you going:
- Http Interceptor which ensures that all calls to Dnn have the necessary security headers
- Data API to quickly get data from WebAPIs
- CMS directives to create toolbars in the Angular App for editing content
- Context information about the page/module and current sxc-objects
- ca. 2015 first version for Angular 2
- ca. 2016 enhanced for Angular 6 and latest 2sxc features
- 2019 Enhanced with Hot-Reloading features for Angular 8 and completely reworked how context is detected in Dnn
- 2020 Improved Hot-Reloading
- 2021-02 Added tag-toolbar attribute and created refresh callback so the page doesn't reload (requires 2sxc 11.12)
- 2021-02-26 v.11.01 - added new attribute angular-path to use as base for lazy loading
To Do Status 2021-03
- enhance the content-manager to provide write commands (ATM read-only) - you can still do this, but must use the context.sxc... classic JS API
- enhance the content-manager to provide create-metadata commands - you can still do this, but must use the context.sxc... classic JS API