{"action":"created","issue":{"url":"https://api.github.com/repos/blacksonic/angular2-es6-starter/issues/7","repository_url":"https://api.github.com/repos/blacksonic/angular2-es6-starter","labels_url":"https://api.github.com/repos/blacksonic/angular2-es6-starter/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/blacksonic/angular2-es6-starter/issues/7/comments","events_url":"https://api.github.com/repos/blacksonic/angular2-es6-starter/issues/7/events","html_url":"https://github.com/blacksonic/angular2-es6-starter/issues/7","id":142779375,"number":7,"title":"How do I use templateUrl and styleUrls in a Component?","user":{"login":"mraible","id":17892,"avatar_url":"https://avatars.githubusercontent.com/u/17892?v=3","gravatar_id":"","url":"https://api.github.com/users/mraible","html_url":"https://github.com/mraible","followers_url":"https://api.github.com/users/mraible/followers","following_url":"https://api.github.com/users/mraible/following{/other_user}","gists_url":"https://api.github.com/users/mraible/gists{/gist_id}","starred_url":"https://api.github.com/users/mraible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mraible/subscriptions","organizations_url":"https://api.github.com/users/mraible/orgs","repos_url":"https://api.github.com/users/mraible/repos","events_url":"https://api.github.com/users/mraible/events{/privacy}","received_events_url":"https://api.github.com/users/mraible/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-22T21:03:00Z","updated_at":"2016-03-23T19:07:38Z","closed_at":null,"body":"I've created a simple example app using https://github.com/mgechev/angular2-seed as a starter. angular2-seed uses TypeScript and now I'm trying to create a similar app that uses ES6 for comparison. In the TypeScript app, I'm able to the following:\r\n\r\n```\r\n@Component({\r\n  selector: 'sd-search',\r\n  moduleId: module.id,\r\n  templateUrl: './search.component.html',\r\n  styleUrls: ['./search.component.css'],\r\n  directives: [FORM_DIRECTIVES, CORE_DIRECTIVES, ROUTER_DIRECTIVES]\r\n})\r\n```\r\n\r\nHowever, if I do this in an app that uses angular2-es6-starter, there's a 404 on the `templateUrl` and `styleUrls`. I was able to workaround the template by importing it:\r\n\r\n```\r\nimport template from './search.component.html';\r\n\r\n@Component({\r\n    selector: 'sd-search',\r\n    moduleId: module.id,\r\n    template: template,\r\n    styleUrls: ['./search.component.css'],\r\n    directives: [FORM_DIRECTIVES, CORE_DIRECTIVES, ROUTER_DIRECTIVES]\r\n})\r\n```\r\n\r\nHowever, I'm not sure how to accomplish the same for the `styleUrls` property. How do I use `templateUrl` and `styleUrls` in a Component when using this project?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/blacksonic/angular2-es6-starter/issues/comments/200499180","html_url":"https://github.com/blacksonic/angular2-es6-starter/issues/7#issuecomment-200499180","issue_url":"https://api.github.com/repos/blacksonic/angular2-es6-starter/issues/7","id":200499180,"user":{"login":"firecube","id":137861,"avatar_url":"https://avatars.githubusercontent.com/u/137861?v=3","gravatar_id":"","url":"https://api.github.com/users/firecube","html_url":"https://github.com/firecube","followers_url":"https://api.github.com/users/firecube/followers","following_url":"https://api.github.com/users/firecube/following{/other_user}","gists_url":"https://api.github.com/users/firecube/gists{/gist_id}","starred_url":"https://api.github.com/users/firecube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firecube/subscriptions","organizations_url":"https://api.github.com/users/firecube/orgs","repos_url":"https://api.github.com/users/firecube/repos","events_url":"https://api.github.com/users/firecube/events{/privacy}","received_events_url":"https://api.github.com/users/firecube/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T19:07:38Z","updated_at":"2016-03-23T19:07:38Z","body":"Those URLs are relative to the HTML page serving your app and not the component."}}