Referencing angular partials from a jade view I recently ran into a weird problem whereby I couldn’t get a jade template to reference an angular partial using the ng-include directive. I assumed it was as simple as passing in the relative path to the partial view as per: div(ng-include="/partials/featured-courses/") 1 div(ng-include="/partials/featured-courses/") or: div(ng-include='partials/featured-courses') 1 div(ng-include='partials/featured-courses') but this was just completely ignored by Angular – I could see from Firebug that no HTTP request was even being made for this file, so I knew there was some syntax issue here. So I googled it with Bing, as you do, and found this StackOverflow article entitled ‘JADE templating engine does not render ng-include‘. As the answers specify, there’s an odd syntax to getting this working. I followed the guidelines and it worked. The syntax is as folows: div(ng-include='\'partials/featured-courses\'') 1 div(ng-include='\'partials/featured-courses\'') I have no idea why this particular syntax is required – if anyone knows, please feel free to drop me an email and I’ll update the...Read More »
On my blog…
I'm a gadget loving code-junkie who loves to program, create websites and try out new stuff. Married, with two young daughters I am also a keen marathon runner and fitness enthusiast.
- Cloud Technologies (Azure & AWS)
- Mobile application development
- WordPress / Orchard CMS / Alterian ACM
- C#, Asp.net MVC & WebForms, Python
- IIS & Windows Server