Question: I'm getting a weird error when i try to set templateUrl in my component.

This works:

```
@Component({
    selector: 'buildingInfo',
    template: `
        <html>stuff</html>
    `
})

```

But when i do this (with the same content in the html-file):

```
@Component({
    selector: 'buildingInfo',
    templateUrl: 'stuff.component.html'
})

```

the output is this:

```
<span>M</span>
<span>M</span>
<fakediscoveryelement></fakediscoveryelement>
<span>M</span>
<fakediscoveryelement></fakediscoveryelement>
<span>M</span>
<span>M</span>
<span>M</span>
<span>M</span>
<span>M</span>
<span>M</span>
<span>M</span>
<span>M</span>

```

I have no idea why this happens. I get the same output when i try to use a seperate file for html on almost all other components (but not all).

Answer: 
If you want Angular to find the templates relative to the Component e.g. you have a structure like

app/

app/app.component.ts

app/app.component.html

make sure, you set the module id of the component. That'll cause the System loader to look relative to your current path. Otherwise, it will *always* expect the complete path as URL.

Example for SystemJS:

```
declare var __moduleName: string;
@Component({
    moduleId: __moduleName,
    selector: 'foo-bar',
    templateUrl: 'app.component.html',
})

```

Example for others:

```
@Component({
        moduleId: module.id,
        selector: 'foo-bar',
        templateUrl: 'app.component.html',
    })

```

It took me some time to get this one :)
You can't have an `<html>` tag in your template. `<html>` is a top-level tag in an HTML file and an Angular application can only be used on or inside `<body>` and `<body>` can't contain an `<html>` tag.