首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
Angular 学习之路
已注销
创建于2022-03-01
订阅专栏
我的 Angular 学习笔记
等 18 人订阅
共226篇文章
创建于2022-03-01
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
Angular getSimpleChangesStore的实现原理
父组件的ngOnInit钩子里,并没有SimpleChanges相关的数据结构:而子组件就不一样了:直接从Component实例的__ngSimpleChanges__字段里读取数据:更多Jerry的
Angular内部对template的处理学习笔记
https://blog.angular-university.Clearly Angular is not handling the template simply as a string.Angular绝不仅仅是将template当成一个string来处理。It’s actu...
Angular ngOnChanges hook学习笔记
只有这三种事件才会导致Angular视图的更新,都是异步事件。https://angular.Respond when Angular sets or resets data-bound input properties. The method receives a Simple...
Angular set函数和Component属性的命名冲突问题
set函数和Component属性名称不能重复,可以把Component属性加上下划线,暗示其是私有属性,然后通过公有的set来管理。
Angular Component ngOnInit和ngAfterViewInit调用时机的讨论
而ngAfterViewInit的调用时机:在ngOnInit之后,注释里写得比较清楚。
使用Angular的property binding给HTML DOM元素的class动态赋值
console.log('Jerry: ' + this..运行时,最后通过HTML DOM原生的el.classList.addClass @ platform-browser.addClass @ animations.(anonymous) @ common._toggle...
Angular property binding重复触发的问题讨论
console.log('Jerry: ' + this.下面是分别研究这四次get调用的上下文。同第一次触发一样,同样是在tick方法里,只不过第一次触发在tick的view.detectChanges里,而第二次触发,在view.* Invoke this method to...
Angular里的style property binding的一个例子
<div [style.* Writes class/style to element.* @param {?} renderer Renderer to use.* @param {?} rNode The Node to write to.* @param {?} prop ...
Angular里的property binding的一个例子
如果src不加中括号,hero.renderer.
Angular里interpolation text节点的创建逻辑,单步调试
assertEqual(getBindingIndex(), tView.const tNode = tView.(/** @type {?} */ (tView.// Text nodes are self closing.ngDevMode && ngDevMode.ngDe...
Angular数据绑定的学习笔记
https://angular.Property binding in Angular helps you set values for properties of HTML elements or directives.property binding用于给html元素或者Di...
Angular应用页面里appId的生成逻辑和位置
DomRendererFactory2类的构造函数里,看到三个输入参数。我们感兴趣的是,appId这个三位随机字符,是如何生成的。前面这个classRef是DomRendererFactory2的构造函数。后面是调用该构造函数传入的输入参数,我们要关注的appId也是这三个输入参...
Angular应用页面里_ngcontent属性的生成逻辑
我们打开一个Angular应用,发现其渲染页面里的DOM元素,包含了形如_nghost-, 以及_ngcontent-这种属性。这些属性在platform-browser.this.const styles = flattenStyles(appId + '-' + compon...
Angular Component的renderer创建机制以及Angular版本号的确定方式
我的Angular应用里,有一个selector为app-root的Component:运行时,基于这个selector创建Component reference:进而创建root Component
Angular Component模板里的元素,运行时如何被生成并插入到DOM tree中
最后在platform-browser.
Angular应用bootstrap时的version检测机制
core.ngModule = ngModule || this.const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.const rendererFactory = (/** @...
Angular Reactive Form里的setNgReflectProperty
源代码:ctrl单击formControl:找到其实现位置:form需要绑定一个FormControl实例进去,如下图所示:setNgReflectProperty函数里的代码:value就是favo
Angular ngIf指令运行时执行原理
_elseTemplateRef和_elseViewRef为空,意思是template中的ngif没有指定如果条件为false,应该加载什么template或者view.thenTemplateRef指向的是如果condition为true,应该加载的模板信息。这个formArr...
Angular formControl指令定义的位置
网上很多帖子,只介绍了要使用图中的formControl指令,需要导入ReactiveFormsModule,但却并未解释原因。按住鼠标左键,单击[formControl], 自动来到forms.d.ts文件,根据关键字formControl搜索(注意,打开大小写敏感的搜索开关)...
Angular form学习笔记:Angular两种实现form的方式
https://angular.Angular provides two different approaches to handling user input through forms: reactive and template-driven. Both capture u...
下一页