These are chat archives for systemjs/systemjs

2nd
Nov 2017
Ghost
@ghost~59dff4f2d73408ce4f79ce02
Nov 02 2017 03:15

I am working on a personal angular 4 App. When I use the app without app-root, everything works. But as soon as I replace the content with <app-root> and modified app.component.html with the content, the CSS of the page is fucked up. Do you have an idea

<head>
<base href="/tool"/>
<!-- Bunch of CSS files -->

<link rel="icon" type="image/x-icon" href="favicon.ico"/>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>

<script src="systemjs.config.js"></script>

<!-- FreeWall : for the image tiling -->
<script src="jquery-3.1.1.min.js"></script>

<script>
    System.import('app').catch(function (err) {
        console.error(err);
    });
</script>

</head>

<body>

<app-root>Loading...</app-root>
</body>
</html>

--app.component.ts
import {Component} from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  moduleId: module.id
})
export class AppComponent {
  title = 'app';
}

I have been searching for so long. Any help is welcome.