Balázs Orbán Balázs Orbán - 1 year ago 198
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?

Answer Source

typo in baserurl. it should be baseurl

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download