本文整理匯總了TypeScript中@angular/core.NgZone.isInAngularZone方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript NgZone.isInAngularZone方法的具體用法?TypeScript NgZone.isInAngularZone怎麽用?TypeScript NgZone.isInAngularZone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/core.NgZone
的用法示例。
在下文中一共展示了NgZone.isInAngularZone方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: spy
autofillStream.subscribe(() => spy(NgZone.isInAngularZone()));
示例2: spy
const subscription = ruler.change(0).subscribe(() => spy(NgZone.isInAngularZone()));
示例3: spy
const subscription = overlayRef.detachments().subscribe(() => spy(NgZone.isInAngularZone()));
示例4: spy
focusMonitor.monitor(buttonElement).subscribe(() => spy(NgZone.isInAngularZone()));
示例5: value
@Input()
set value(v: number) { expect(NgZone.isInAngularZone()).toBe(true); }
示例6: runNgZoneNoLog
runNgZoneNoLog(() => { expect(NgZone.isInAngularZone()).toEqual(true); });
示例7: it
it('should return whether the code executes in the inner zone', () => {
expect(NgZone.isInAngularZone()).toEqual(false);
runNgZoneNoLog(() => { expect(NgZone.isInAngularZone()).toEqual(true); });
}, testTimeout);
示例8: expect
events.on(element, 'click', () => {
expect(NgZone.isInAngularZone()).toBe(true);
counter++;
});