(2017-03-13)更新:
  所有提及的moduleId均已删除。删除了“组件相对路径”食谱
  
  我们在建议的SystemJS配置中添加了一个新的SystemJS插件(systemjs-angular-loader.js)。该插件为您动态地将templateUrl和styleUrls中的“相对于组件”的路径转换为“绝对路径”。
  
  我们强烈建议您仅编写组件相对路径。这是这些文档中讨论的URL的唯一形式。您不再需要写@Component({ moduleId: module.id }),也不需要。
资料来源:https : //angular.io/docs/ts/latest/guide/change-log.html
定义:
moduleId?: string
moduleId@Component批注内的参数取一个string值为:
“ 包含组件的模块的模块ID。 ”
CommonJS的用法:module.id,
SystemJS的用法: __moduleName
使用原因moduleId:
moduleId 如文档中所述,用于解析样式表和模板的相对路径。
  包含组件的模块的模块ID。需要能够解析模板和样式的相对URL。在Dart中,这可以自动确定,无需设置。在CommonJS中,可以始终将其设置为module.id。
ref(旧):https://angular.io/docs/js/latest/api/core/index/ComponentMetadata-class.html
  我们只需设置@Component元数据的moduleId属性,即可指定模板和样式文件相对于组件类文件的位置
参考:https : //angular.io/docs/ts/latest/cookbook/component-relative-paths.html
用法示例: 
资料夹结构:
RootFolder
├── index.html
├── config.js
├── app
│   ├── components
│   │   ├── my.component.ts
│   │   ├── my.component.css
│   │   ├── my.component.html
没有module.id:
@Component({
  selector: 'my-component',
  templateUrl: 'app/components/my.component.html', <- Starts from base path
  styleUrls:  ['app/components/my.component.css'] <- Starts from base path
})
使用module.id:
tsconfig.json:
{
  "compilerOptions": {
    "module": "commonjs", <- need to change this if you want to use module.id property
...
@Component({
  moduleId: module.id,
  selector: 'my-component',
  templateUrl: 'my.component.html', <- relative to the components current path
  styleUrls:  ['my.component.css'] <- relative to the components current path
})