2016-02-29 67 views
0

有没有办法在没有webpack的Angular2 templateUrl中使用Jade?Angular2 templateUrl with Jade?

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

我-app.component.jade

ul 
    li One 
    li Two 
    li Three 

回答

0

当然,从DIST建设开发服务在正确的位置是什么成分链接HTML文件。在简单的任务生成进度用一口玉例如:

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

退房与玉我的复杂Angular2样板项目模板在GitHub上 - >https://github.com/NN77/ng2-complexity/blob/master/gulpfile.ts

+0

是。这很好用!谢谢! –