Gewusst wie: übergeben von Variablen, if-Anweisung mit jade-Vorlage

Ich bin vorbei service_type durch jade. Versucht zu kompilieren mit service_type = 'gas'.
Ich habe versucht:

- if(#{service_type}=='gas')
p gas

Habe ich auch versucht:

- if('#{service_type}'=='gas')
p gas

aber weder die Arbeit... Wie kann ich zwei strings sind gleich?

InformationsquelleAutor Matt | 2011-10-27

Schreibe einen Kommentar