开发者

What is the equivalent of yield in jade?

开发者 https://www.devze.com 2023-03-06 00:21 出处:网络
In Ruby/Sinatra/Haml I would write: 开发者_高级运维%html{:lang => \'en\'} %head %meta{:charset => \'utf-8\'}

In Ruby/Sinatra/Haml I would write:

开发者_高级运维%html{:lang => 'en'}
  %head
    %meta{:charset => 'utf-8'}
    %title= @title

  %body
    =yield

What would it look like in Node/Express/Jade?


I found the solution:

html(lang="en")
  head
    meta(charset="utf-8")
    title= title

  body
    != body
0

精彩评论

暂无评论...
验证码 换一张
取 消