扫码关注官方订阅号
1.页面中的占位符,比如<my-app></my-app>怎么在页面渲染后消掉
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
这种写法去不掉的,replace属性已经被去掉了,看这个issue。
解决这个问题的办法是在组件当中使用属性来替代你这种写法:
js中定义: selector: '[myComponent]' html中使用: Hello My component
参考链接:Remove the host HTML element selectors created by angular componentHow to remove/replace the angular2 component's selector tag from HTML
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
这种写法去不掉的,replace属性已经被去掉了,看这个issue。
解决这个问题的办法是在组件当中使用属性来替代你这种写法:
参考链接:
Remove the host HTML element selectors created by angular component
How to remove/replace the angular2 component's selector tag from HTML