2016-02-29 119 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

是。這很好用!謝謝! –