Grunt jade compiler filling out empty attributes

只谈情不闲聊 提交于 2019-12-06 13:40:28
Gildor

Everything seems good when there's doctype html at the beginning of the .jade file.

For partials that does not have doctype, it can also be solved by passing {doctype: 'html'} as option when calling Jade:

jade -O "{doctype:'html'}" partial.jade

It works for grunt-contrib-jade too by adding doctype: 'html' to the options, like so:

jade: {
  devel: {
    options: {
      pretty: true,
      doctype: 'html'
    },
    files: [{
      expand: true,
      cwd: 'src',
      src: [ '**/*.jade' ],
      dest: 'app',
      ext: '.html'
    }]
  }
}

Use pure html in your jade: <div ui-view></div>

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!