These are chat archives for AngularClass/angular2-webpack-starter
An Angular 2 Webpack Starter kit featuring Angular 2, Router, TypeScript, and Webpack by AngularClass
Hi, loving the example, had a question about image loading. I like the idea of using the url loader in webpack to embed base64 encoded images into my bundle. What I can't figure out is how the hell to reference them in my template
var x= document.createElement('img');
x.src = require('./image.jpeg');
Embeds the image beautifully. My question is, how do I make the template aware of the x variable?
Thanks
@EladRK soon they will support styles in the View decorator annotation so you could either do (in the future next release) still using webpack
@View({
template: require('./home.html'),
style: require('./home.css')
})
without webpack or any other module system, while still in node, then you would use angular itself
@View({
moduleId: module.id,
templateUrl: ‘./home.html’
styleUrl: ‘./home.css’
})