Skip to content

Fix/tsconfig playground paths#274

Open
izifortune wants to merge 2 commits intojvandemo:masterfrom
izifortune:fix/tsconfig-playground-paths
Open

Fix/tsconfig playground paths#274
izifortune wants to merge 2 commits intojvandemo:masterfrom
izifortune:fix/tsconfig-playground-paths

Conversation

@izifortune
Copy link
Collaborator

Some rework around the playground removing the need to compile the main
library.
Please test it out

@jvandemo
Copy link
Owner

jvandemo commented Feb 4, 2018

@izifortune This looks awesome. Have you been able to test it yet with different libraries?

Great work!! 🏆

@izifortune
Copy link
Collaborator Author

@jvandemo didn't have the time to go to through a full test. I will try to put some time on it this week

@jvandemo
Copy link
Owner

jvandemo commented Feb 6, 2018

@izifortune — Thank you, much appreciated! 🏆

@kkozlowski89
Copy link

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?

@kkozlowski89
Copy link

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

@izifortune
Copy link
Collaborator Author

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?

@kkozlowski89
Copy link

kkozlowski89 commented Feb 21, 2018

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.

@izifortune
Copy link
Collaborator Author

Meaning we need a proper build to get all the cases covered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants