Balázs Orbán Balázs Orbán - 5 months ago 56
Jade Question

Jade variable in variable

I have a .jade file with only variables. One of them is a variable which begins with a variable defined before it.


My variables.jade file:

- var baseurl = ''
- var assets = baserurl+'/assets'
- var images = assets+'/images'

My main.jade file:

include variables

The html will be:

<img src='undefined/assets/images/1.jpg'>

Why does the baseurl appear as undefined?


typo in baserurl. it should be baseurl