We just released the dnn-sxc-angular connector library, which helps you mount/bootstrap angular SPA apps in DNN (a fairly difficult feat). Enjoy!
Core Features
- Automatically injects all DNN properties like ModuleId, TabId, SecurityToken etc. into Angular
- Automatically injects all 2sxc properties (like content-block-id) into Angular
- Automatically modifies all Http Requests to use the standard DNN headers
- Uses a modern Reactive / Observable Architecture to achieve this
- Your Angular-code doesn't need to know about anything, and can be developed as if it were running outside of DNN.
- Special Enter-Key trap to prevent Enter-Keys from accidentally causing asp.net Forms Submit
- Special APIs to access 2sxc content and queries very quickly
How To Use
It's published on Github and NPM where you can find more documentation. In general you'll do this
- npm install '@2sic.com/dnn-sxc-angular'
- make some minor changes to your code - as explained in the NPM readme
- build your solution
It Work Using Observables
Internally it uses Reactive Observables, which is a fairly complex topic and important if you want to develop future-style JavaScript. As this topic is so complex, I'll write a separate blog about it.
Example Implementation
We also just released a Directory SPA App, which uses this so you can discover how it works.
Hope you love it :)
Daniel