When we think of using template in Angular2 or Angular1.X, we know below is one of the basic way of writing:
template
template: \'./template-ninja.html\'>
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