Skip to content

Instantly share code, notes, and snippets.

View arturovt's full-sized avatar
🎯

Artur arturovt

🎯
View GitHub Profile
this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);
this.processNavigations();
processNavigations(): void {
this.navigations.pipe(concatMap((nav: NavigationParams) => {
if (nav) {
this.executeScheduledNavigation(nav);
// a failed navigation should not stop the router from processing
// further navigations => the catch
return nav.promise.catch(() => {});
this.transitions = new BehaviorSubject<NavigationTransition>({
id: 0,
currentUrlTree: this.currentUrlTree,
currentRawUrl: this.currentUrlTree,
extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),
urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),
rawUrl: this.currentUrlTree,
extras: {},
resolve: null,
reject: null,
class ApplyRedirects {
private getChildConfig(
ngModule: NgModuleRef<any>,
route: Route,
segments: UrlSegment[]
): Observable<LoadedRouterConfig> {
if (route.children) {
return of(new LoadedRouterConfig(route.children, ngModule));
}
V8_NOINLINE static Type Stats_Runtime_DynamicImportCall(
int args_length,
Object** args_object,
Isolate* isolate
) {
RuntimeCallTimerScope timer(isolate, RuntimeCallCounterId::kRuntime_DynamicImportCall);
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.runtime"), "V8.Runtime_" Runtime_DynamicImportCall);
Arguments args(args_length, args_object);
return __RT_impl_Runtime_DynamicImportCall(args, isolate);
}
import 'zone.js';
const myFirstZone = Zone.current.fork({
name: 'моя первая зона'
});
console.log(myFirstZone.name); // моя первая зона
console.log(myFirstZone.parent === Zone.current); // true
const myFirstZone = Zone.current.fork({
name: 'моя первая зона',
onInvoke(parentZoneDelegate, _, targetZone, delegate, applyThis, applyArgs, source) {
console.log('мы где-то вызвали метод `run`');
return parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source);
}
});
myFirstZone.run(() => {
this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
Zone.__load_patch('timers', function(global) {
var set = 'set';
var clear = 'clear';
patchTimer(global, set, clear, 'Timeout');
});
function patchTimer(window, setName, setClear, nameSuffix) { ... }
interface TaskData {
/**
* Если это `setInterval`, то `true`, иначе `false`
*/
isPeriodic?: boolean;
/**
* `delay`, который мы передаем вторым аргументом
*/
delay?: number;
/**