V31 V31 - 9 days ago 7
Jade Question

Jade Mixins in AngularJS

Hi I would like to implement Jade templates in my AngularJS project, and have mixin in my template (reusable code).

However the problem that I am facing is that we cannot use Mixin with arguments. Am I doing it correctly or is there any alternative for the same in AngularJS that I am missing?

V31 V31
Answer

I figured out that mixins cannot be used in Angular as the scope is to be defined. Hence now created element directive and passed in the template (which was meant to be written in Mixin) as the templateUrl in it.