首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
Angular 学习之路
已注销
创建于2022-03-01
订阅专栏
我的 Angular 学习笔记
等 18 人订阅
共226篇文章
创建于2022-03-01
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
Angular form控件的shadow DOM
在input控件里输入一个33后,在生成的html里,能看到shadow-root节点下的div标签,里面包含了33的值。
Angular form控件原生HTML代码里ng-reflect-form属性和其值的生成时机
Angular Component html里加了方括号的Directive,浏览器是无法识别的,在Angular core.js里,在执行Component template实现函数时,会调用Angular的ɵɵproperty函数,将中括号包裹的Angular指令展开:Upd...
Angular form学习笔记
https://angular.the objects that live in the component to store and manage the form, and the visualization of the form that lives in the tem...
Angular jasmine fixture.detectChanges如何触发directive的set方法
import { FocusDirective } from './focus.import { KeyboardFocusService } from '.TestBed.}).fixture = TestBed.component = fixture.fixture.serv...
Angular jasmine returnValue方法的实现原理
首先创建一个闭包函数this.plan,存储传入的期望返回值。this.plan是SpyStrategy的一部分。callThrough的意思是,仍然监控函数的执行,只是wrapper执行时,返回原始函数调用的结果。
Angular jasmine spied Method toHaveBeenCalled的执行原理
语法:expect(传入一个被spied后的方法).el.spy函数的and属性就是SpyStrategy,其Plan属性返回的就是andReturnValue里指定的值。calls属性就是调用tracker.
Angular jasmine spyOn函数的实现原理
语义:希望service.findFirstFocusable方法被监控,同时其调用之后,返回el变量。这两个参数去调用spyRegistry.spyOn方法。其中and指向spy strategy,calls指向调用监控器 tracker.
Angular jasmine如何从detectChange触发refreshView进而执行到Component的hook实现
触发RefreshView:refreshView的方法实现里,会多处调用executeCheckHook方法:每个待执行的hook方法的名称都能在注释里找到:例如:execute pre-order
Angular refreshView里Component template函数的执行原理
* Copyright Google LLC All Rights Reserved.* found in the LICENSE file at https://angular.* Bindings for pure functions are stored after reg...
Angular开发模式下的setNgReflectProperties函数
* e.g. for (let i = 0; i < dataValue.
Angular refreshView的执行原理
* Processes a view in update mode. * - refreshing child (embedded and component) views.setBindingIndex(tView.const preOrderCheckHooks = tVie...
Angular jasmine单元测试框架fixture.detectChanges的实现原理
this.detectChangesInRootView(this.checkNoChangesInRootView(this.
Angular jasmine单元测试框架TestBed.createComponent的实现原理
const result = this.testModuleRef.injector.
Angular jasmine单元测试框架里使用it函数定义single spec
* Define a single spec. A spec should contain one or more {@link expect|expectations} that test the state of the code.* A spec whose expecta...
Angular jasmine单元测试框架里describe的实现原理
getJasmineRequireObj().* Callback passed to parts of the Jasmine base interface.* By default Jasmine assumes this function completes synchro...
Angular Component的默认changeDetection策略
默认策略为:ChangeDetectionStrategy.* Type of the Directive metadata.const ɵ2$1 = (c = {}) => (Object.assign({ changeDetection: ChangeDetectionStr...
Angular的_zone.onMicrotaskEmpty最终会通过changeDetect重新刷新视图
_zone.this.this.this.this.this.this.this.this.this.this.this.* Get a list of component types registered to this application.* This list is p...
巧用Angular项目的get设置Angular class属性访问的别名
以this.* given by the `elementRef`.return this.elementRef.
每个施加在HTML元素上的Angular Directive,运行时都会生成一个新的实例
每个施加在HTML元素上的Directive,运行时都会生成一个新的实例。
使用FakeAsync对Angular异步代码进行单元测试
The problem with async is that we still have to introduce real waiting in our tests, and this can make our tests very slow.Async的一个缺陷是,我们仍然需...
下一页