Custom Handlerbar susbtitution support
Please provide us with the following information:
- OS Mac OSX ( El Capitan)
- Versions. angular-cli: 1.0.0-beta.9
- Repro steps. Support for custom handlerbar template.
- Update index.html to support external lib by handlerbar expension
{{#each scripts.polyfills}}
<script src="{{.}}"></script>
{{/each}}
{{#each scripts.libs}}
<script src="{{.}}"></script>
{{/each}}
- In angular-cli-build.js if i add custom option it will not passed on to handlebar
var app = new Angular2App(defaults, {
vendorNpmFiles: external.node_modules.files,
polyfills: external.polyfills,
libs: external.libs,
//destDir: dest,
});
- None
- Mention any other details that might be useful.
I have resolve this by extending Angular2App and override _getIndexTree
class MyAngular2App extends Angular2App
{
constructor(project, inputNode, options) {
super(project, inputNode, options);
}
_getIndexTree()
{
let replacer = super._getIndexTree();
let scripts = replacer._context.scripts;
scripts.libs = vendor.libs;
scripts.json = vendor.json;
replacer._context.css =
{
vendors: vendor.css
}
return replacer;
}
}
Ideally , there should be option in angular-cli.json or angular-cli-build.js to provide additional replacer for updating tempalte. CSS, JSON, external lib may be used commonly so support for them should be theer atleast
Thanks! We'll be in touch soon.
Closed as this issue was made obsolete by https://github.com/angular/angular-cli/pull/1455.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.