且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Angular 2:找不到模块:错误:无法解析

更新时间:2022-02-14 09:59:55

如果你的组件在同一个目录中,那么你也需要将你的 templateUrl 指向同一个文件夹.您可以这样做:

If your component is inside the same directory, then you need to point your templateUrl to the same folder as well. Here is how you can do it:

@Component({
    selector: 'app-sb',
    templateUrl: './sb.component.html'
})