更新时间:2023-02-09 23:22:27
问题可能来自moduleId should be a string in "NavbarComponent"
.
由于Angular CLI现在使用Webpack,因此Webpack中的module.id是一个数字,而Angular需要一个字符串.您应该做的是删除moduleId
元数据.
As Angular CLI now use Webpack, module.id in Webpack is a number, while Angular expects a string. What you should do is remove the moduleId
metadata.
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css']
})