fuse-box / fuse-box/angular2-example
Unable to use Components' `templateUrl` property
- 主要语言
- HTML
- 星标
- 43
- 派生
- 13
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi Guys,
I've just tried fuse-box and it's just unbelievably fast! Nothing compared with the tons configuration I've write to run webpack or systemjs in a simple "hello world" project. And this project also helped me a lot to start working with fuse-box.
I was wondering if there's a way (or a plugin) to use Angular2 Components' `templateUrl` property instead of just requiring the template and push it in the code. Basically I would like to avoid calling the `require` function and just write the url of my template. This is more annoying when you have an array of css to include (using RawPlugin for css files).
Current usage
Preferred usage
@Component({
selector: 'app',
template: require('./app.component.html')
styles: [ require('./app.component.css') ]
}
@Component({
selector: 'app',
templateUrl: './app.component.html'
styleUrls: [ './app.component.css' ]
}
Anyway, the result should be the same for both usage, so the template content will be pushed in the bundle itself. But, since this feature is already available in webpack/systemjs, do you mind it will be also for fuse-box? Maybe "overriding" (decorating), if possibile, the decorator implementation?
Thank you :)
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 issue 中的 Angular @Component 示例开始,检查项目的 Angular 集成或插件入口点;payload 将 app.component.html 和 app.component.css 指定为资源路径。分别复现基于 require 的用法以及 templateUrl/styleUrls 的用法,然后验证被引用的模板和样式是否以等效结果包含在 bundle 中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, javascript
- 领域
- frontend, web-dev
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100