Aristein
Aristein

Reputation: 41

how to using jade Mixin in Javascript?

In jade, i'm make test mixins

mixin test(testName)
  #test
   span Test String

But i want using this in javascript (this is declare in jade file)

script(type='text/javascript').
    $( document ).on( "click", "#addBtn", function() {
        $("#list").append( I WANT USE MIXIN THIS PLACE );
    });

How to use mixin in javascript?

Upvotes: 3

Views: 1402

Answers (1)

David Dias
David Dias

Reputation: 312

You can't use a Jade mixin in a JavaScript file because Jade templates are rendered on server side.

Upvotes: 2

Related Questions