Skip to main content
Home  ›  Blog

Episode VI: Return of the ng serve - May the 4th be with you

Developing Angular with ng serve is magic, as you see the results in real-time while coding. But doing this with an app which uses endpoints on DNN is almost impossible. But not any more, the rebellion has found a cool solution...

What is dnn-sxc-angular

This is an npm component which you can add to your angular applications. It automatically...

  1. looks at the page and detects things like tab-id, module id and the security token
  2. changes all http-requests to DNN to have the necessary headers

To install it, use this azing recipe. And you can also look at it on git and npm.

Local Development in Version 6

Previously you always had to build the app and run it in DNN to see if it works. This needs a lot of time compared to just running it localling using ng serve. In Version 6 we added

  1. a complete infrastructure to give dnn-sxc-angular initialization values (since it can't auto-detect them when not running in DNN)
  2. changed 2sxc in 9.43 to have a new feature, which fixes many known CORS problems (because otherwise the cross-domain requests from localhost will usually be refused).

To set this up, there is also an azing recipe.

Love from Switzerland,
Daniel and Raphael

Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see github), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler