This project is read-only.

Orchard Angular

Topics: Administration, Core, Customizing Orchard, General
Aug 3, 2015 at 12:29 PM
I am writing a module for orchard which will be mostly built from angular. I'm not new to angular and am fairly comfortable with orchard. I have done a lot of MVC work. I am however having difficulty getting the two to run together.

I managed to get one page/view working but am having problems with the routing. If someone could point me to an example module which uses angular. that would be great

Aug 3, 2015 at 12:38 PM
Edited Aug 3, 2015 at 12:38 PM
The Orchard.Layouts module uses AngularJS for the layout editor. Let me know if you have any questions about that.
Aug 3, 2015 at 12:58 PM
Thanks for the quick reply. I was having a look at that but is doesn't seem to userouting (ngroute).
Aug 4, 2015 at 1:20 PM
OK I have the routing working. My main problem now is using templates. I can use inline templates ok but if i reference a html template file I always get file not found. I'm sure there is a simple solution to this.
Aug 4, 2015 at 1:26 PM
Yes, by default Orchard locks down everything using web.config, and then remaps the * path to StaticFileHandler from folders such as Styles and Scripts. So in your case, you could add a StaticFileHandler mapping to a web.config file in the folder where your HTML templates are stored.
Aug 4, 2015 at 2:08 PM
Thanks i have tried that but cant quite get it to work. Could you direct me to a sample or tutorial that may help.