Angular2 模板与翡翠的网址

Angular2 templateUrl with Jade?

本文关键字:Angular2      更新时间:2023-09-26

有没有办法在没有webpack的情况下在Angular2模板URL中使用Jade?

@Component({
selector: 'my-app',
templateUrl: 'my-app.component.jade'
})

my-app.component.jade

ul
  li One
  li Two
  li Three

当然,在构建开发中 dist 在正确的位置提供 html 文件,哪些组件链接。在构建过程中,在简单任务中使用 gulp-jade,例如:

gulp.task('html:build', () =>
  gulp.src(PATH.src.jade)
    .pipe(jade())
    .pipe(gulp.dest(PATH.dest.app.component))
);

在GitHub上查看我复杂的Angular2样板项目和Jade模板 --> https://github.com/NN77/ng2-complexity/blob/master/gulpfile.ts