generator-angular2-library
generator-angular2-library copied to clipboard
Fix/tsconfig playground paths
Some rework around the playground removing the need to compile the main library. Please test it out
@izifortune This looks awesome. Have you been able to test it yet with different libraries?
Great work!! 🏆
@jvandemo didn't have the time to go to through a full test. I will try to put some time on it this week
@izifortune — Thank you, much appreciated! 🏆
Hi,
I made changes but I have problem with html files in my components. For example: Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/spinner.component.html
Do you have idea why?
If I use component like it - it works fine.
import { Component } from '@angular/core';
@Component({
selector: 'sample-component',
template: `<h1>Sample component2</h1>`
})
export class SampleComponent {
constructor() {
console.log("hello world!!");
}
}
but when I change template to templateUrl for example
import { Component } from '@angular/core';
@Component({
selector: 'sample-component',
templateUrl: './sample.component.html'
})
export class SampleComponent {
constructor() {
console.log("hello world!!");
}
}
I have as I wrote in previous comment:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3000/sample.component.html
I had a look into this, the problem is that all the html are not copied there.
if i try to copy them inside .playground/src they will not be found anyway because the components are asking those html files regarding to the root /sample.component.html
.
There should be some way with browser sync to manage this, or we might have a look to inline templates as part of the playground:build.
Any suggestions?
If you set absolute path it works like:
src/sample.component.html
But whole solution is not perfect because for example if someone use sass for css - files are not compiled during playground... it is other problem.
Meaning we need a proper build to get all the cases covered