我在angular2组件中定义templateUrl时尝试使用相对路径,如下所述:http://schwarty.com/2015/12/22/angular2-relative-paths-for-templateurl-and-styleurls/
@Component({
selector: 'login-app',
moduleId: module.id,
templateUrl: './app.html'
})
Run Code Online (Sandbox Code Playgroud)
虽然我一直在:
错误:未定义模块
我在ts编译设置上使用-m commonjs.
如何使它工作?
angular ×1