11 2017 档案

摘要:Portal 的主要使用场景是 dynamic component 动态的插入模板或组件. Portal 可分为 2 种. 进入和出去 (in or out) ComponentPortal, TemplatePortal 属于第一种 in PortalOutlet 属性 out TemplateP 阅读全文
posted @ 2017-11-12 11:10 兴杰 阅读(1322) 评论(0) 推荐(0) 编辑
摘要:简单说就是 js 的 media query. 1. BreakpointObserver ng 还包装了一个 observe 方便我们监听 view port 的变化. 此外 ng 也依据 material 的标准提供了一个 enum 方便我们写匹配. 2. MediaMatcher 这个是底层服 阅读全文
posted @ 2017-11-12 11:00 兴杰 阅读(1621) 评论(0) 推荐(0) 编辑
摘要:使用 cdkObserveContent 能让我们监听到 ng-content 内部的变化. 比如某个值换了,或则某个 element 被移除了等等. 在 onpush 的情况下, 通常上面这种 ng-content 的设计, 我们会希望如果 content 改变了, 当前模板也 detechcha 阅读全文
posted @ 2017-11-12 10:40 兴杰 阅读(560) 评论(0) 推荐(0) 编辑
摘要:更新 : 2019-11-29 在使用 focus monitor 的时候要小心, Expression has changed after it was checked 错误 原因是因为 focus monitor 监听的方式是 runOutsideAngular + list focus or 阅读全文
posted @ 2017-11-10 22:00 兴杰 阅读(4448) 评论(0) 推荐(0) 编辑
摘要:更新 : 2020-05-22 https://stackoverflow.com/questions/36866057/c-sharp-tool-that-formats-an-html-string-before-sending-it-to-the-client 手动调用 mini html 也 阅读全文
posted @ 2017-11-06 12:58 兴杰 阅读(1806) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示