首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
Angular 学习之路
已注销
创建于2022-03-01
订阅专栏
我的 Angular 学习笔记
等 18 人订阅
共226篇文章
创建于2022-03-01
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
Angular应用里setTimeout被如何被monkey patched的
monkey patched: monkey patch指的是在运行时动态替换,一般是在startup的时候.将setTimeout保存到一个Angular变量里。在zone-evergreen.Zone.Zone.Zone.for (let i = 0; i < blockin...
Angular 默认的Change detection策略及缺陷
默认策略下,用户事件,计时器,XHR,promise等事件触发,所有的组件都会执行变更检测。console.this.setTimeout(() => this.setTimeout(()=>{ console.测试发现,即使onClick本身的逻辑不会触发任何Component...
如何在Angular单元测试里,对class protected方法进行测试
一种思路是,可以沿用Java里测试protected方法的变通方式,即创建一个新的sub class,继承包含该protected方法的class,然后在子类里新建一个公有方法作为wrapper之用,实现逻辑只有一行,就是调用父类的protected方法。这样,我只需要对子类的公...
Angular应用i18n - internationalization翻译的实现单步调试
this.i18next.this.上图第342行,this.
Angular单元测试框架里API toHaveBeenCalledTimes的工作原理
).and.fixture.expect(document.activeElement.id).expect(spiedFirstFocusable).spiedFirstFocusable是spyOn方法针对实例keyboardFocusService的findFirstFoc...
在Angular单个的单元测试里,调用多次detectChange,会重复执行ngAfterViewInit hook吗
import { FocusDirective } from './focus.import { KeyboardFocusService } from '.1. 2. Once the page is rendered, all subsequent operations wi...
Angular zone学习笔记
https://blog.thoughtram.io/angular/2016/01/22/understanding-zones.function foo() {...function bar() {...function baz() {...timer = performan...
Angular单元测试遇到的错误消息:Uncaught Error - Cannot find module tslib
template: ` <div id="a" [cxFocus]="{ autofocus: true, refreshFocus: model.changeDetection: ChangeDetectionStrategy.
在Angular单元测试代码的it方法里连续调用两次detectChange方法,会触发两次ngAfterViewInit吗
测试结果:第67行执行完毕之后,ngOnChange和ngAfterViewInit均未触发。
Angular单元测试框架beforeEach和it的执行顺序
由此可见,beforeEach相当于ABAP单元测试的setup方法。
关于Angular使用http发送请求后的响应处理
this.favoriteColorControl.valueChanges.console.this.http.get('http://localhost:3000/angular/' + value).subscribe((response)=>console.(error)...
使用Angular的http client发送请求,请求response总是被当成json类型处理
奇怪的问题,我的req.调试代码,http.this.favoriteColorControl.valueChanges.console.var $http = this.http.$http.(response)=>console.(error)=>console.
SAP UI5和Angular的函数防抖(Debounce)和函数节流(Throttle)实现原理介绍
这是Jerry 2021年的第 11 篇文章,也是汪子熙公众号总共第 282 篇原创文章。Jerry之前的文章 SAP UI5 OData谣言粉碎机:极短时间内发送两个Odata request, 前一个会自动被cancel掉吗,介绍过SAP成都研究院CRM Fiori开发团队开...
Angular Component代码和编译后生成的JavaScript代码
!*** C:/Code/SPA/spartacus/feature-libs/organization/administration/components/cost-center/jerry.component.__webpack_require__./* harmony ex...
使用Angular reactive form发送HTTP请求的一个简单例子
this.favoriteColorControl.valueChanges.console.每当form内input field值发生变化时,通过this.formcontrol.
Angular里ngModel双向绑定的一个使用例子
this.return this.this.console.set jerry @ app.component.AppComponent_Template_input_ngModelChange_0_listener @ app.component.executeListener...
Angular里ngClass的一个使用例子
this.
关于Angular directive使用的语法问题
console.console.console.log("Jerry directive in ngOnInit: " + this.console.log("Jerry directive in ngOnInit: " + this.styleUrls: ["./app.com...
Angular property binding的学习笔记
https://angular.To bind to an element’s property, enclose it in square brackets, [], which identifies the property as a target property. A t...
Angular input decorator学习笔记
https://angular.Input decorator只能用在Angular class字段里, 用于指定元数据,将class字段指定成input property.Decorator that marks a class field as an input proper...
下一页