Alternatives to $templateCache in Angular2

前端 未结 4 588
深忆病人
深忆病人 2020-12-31 08:41

When we think of using template in Angular2 or Angular1.X, we know below is one of the basic way of writing:

template: \'./template-ninja.html\'

4条回答
  •  无人及你
    2020-12-31 09:08

    gulp-inline-ng2-template

    Currently the best solution is gulp-inline-ng2-template.

    This takes a component with a templateUrl attribute, plus an html file, and turns it into a component with an inlined template.

    https://github.com/ludohenin/gulp-inline-ng2-template

提交回复
热议问题