Angular页面出不来,显示空白页面。。。

Angular页面出不来,显示空白页面。。。

ng serve -o --port 8888 启动正常,

ng build --prod --base-href ./ 打包也正常,

什么错误信息都没有。。。

可能是selector名称和样式或者关键字冲突了。。。

解决办法:修改selector名称

例如:

/**
 *     片库组件
 *
 * @author 刘宏强
 */
@Component({
    selector: 'video',
    templateUrl: './video.component.html',
    encapsulation: ViewEncapsulation.None
})

改为:

/**
 *     片库组件
 *
 * @author 刘宏强
 */
@Component({
    selector: 'app-video',
    templateUrl: './video.component.html',
    encapsulation: ViewEncapsulation.None
})

猜你喜欢

转载自blog.csdn.net/daqiang012/article/details/83590643