angular

Angular 内容投影 content projection 的一个问题的单步调试
Angular 内容投影 content projection 的一个问题的单步调试

我使用如下代码测试一个最简单的 Angular 内容投影场景:

2022-03-10 03:30:46阅读全文

ng-template 使用过程中默认参数不能按照期望工作的问题单步调试
ng-template 使用过程中默认参数不能按照期望工作的问题单步调试

本文涉及到的代码,位于这个 Github 仓库:https://github.com/wangzixi-d...

2022-03-10 17:42:06阅读全文

通过单步调试的方式学习 Angular 中 TView 和 LView 的概念
通过单步调试的方式学习 Angular 中 TView 和 LView 的概念

本文涉及到的代码位置:https://github.com/wangzixi-d...

2022-03-14 17:11:30阅读全文

关于 Angular 应用 Module 的 forRoot 方法的讨论
关于 Angular 应用 Module 的 forRoot 方法的讨论

在 Angular 开发中,我们经常遇到一个 NgModule 在导入时需要调用它的静态 forRoot 方法。,最值得注意的例子是 RouterModule. 当在 Angular 应用的根目录注册这个模块时,导入RouterModule的方式如下:

2022-07-11 14:03:23阅读全文

关于 Angular view Query 的 id 选择器问题的单步调试
关于 Angular view Query 的 id 选择器问题的单步调试

我有这样一个 Angular Component,模板文件如下:@Component({ selector: 'example-app', template: `

2022-07-11 19:57:43阅读全文

一个 ExpressionChangedAfterItHasBeenCheckedError 错误的解决过程
一个 ExpressionChangedAfterItHasBeenCheckedError 错误的解决过程

我的 Component 里有一个 selectedPane 字段(第56行),作为数据源显示在 div 标签里(代码第47行):

2022-07-11 18:16:41阅读全文

关于 Angular 应用 Components 和 Directives 的实例化问题
关于 Angular 应用 Components 和 Directives 的实例化问题

同 Angular Module 不同,Angular Components 和 Directives 要实例化多次,每个出现在 HTML template 中的 markup 都会对应一次实例化。

2022-07-12 11:24:24阅读全文

Angular 内容投影 content projection 关于选择器问题的单步调试
Angular 内容投影 content projection 关于选择器问题的单步调试

我定义了一个能够允许消费者 Component 将其自定义内容通过 content projection 投射进来的 Component:

2022-07-13 07:02:14阅读全文