- WIS club https://t.me/WIS_Club
- Дитя фреймворка https://t.me/rebenokFrameworka
- NgTalks https://t.me/+h7SIzti3-f42ZDcy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Directive, ElementRef, Input, NgZone } from '@angular/core'; | |
import { HotToastService } from '@ngneat/hot-toast'; | |
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; | |
import { fromEvent, switchMap } from 'rxjs'; | |
@UntilDestroy() | |
@Directive({ | |
selector: '[copy]' | |
}) | |
export class CopyDirective { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private _initSelectedPeople(): void { | |
// this._targetStateService.getAllPeople() | |
// .pipe(takeUntil(this._destroyed$)) | |
// .subscribe((allPeople: TargetModel[]) => { | |
// | |
// console.log(allPeople, 'allpeople'); | |
// | |
// let ids = []; | |
// this._activatedRoute.queryParamMap | |
// .pipe(take(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private _initSelectedPeople(): void { | |
// this._targetStateService.getAllPeople() | |
// .pipe(takeUntil(this._destroyed$)) | |
// .subscribe((allPeople: TargetModel[]) => { | |
// | |
// console.log(allPeople, 'allpeople'); | |
// | |
// let ids = []; | |
// this._activatedRoute.queryParamMap | |
// .pipe(take(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Directive, ElementRef, OnDestroy } from '@angular/core'; | |
import * as textMask from 'vanilla-text-mask/dist/vanillaTextMask.js'; | |
@Directive({ | |
selector: '[appMaskDate]' | |
}) | |
export class MaskDateDirective implements OnDestroy { | |
public mask = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/]; // dd/mm/yyyy | |
public maskedInputController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('VideoService', () => { | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [HttpModule], | |
providers: [ | |
{ provide: VIMEO_API_URL, useValue: 'http://example.com' }, | |
VideoService, | |
{ provide: XHRBackend, useClass: MockBackend }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('TaskApiService', () => { | |
let httpClient: HttpClient; | |
let taskApiService: TaskApiService; | |
let httpTestingController: HttpTestingController; | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [HttpClientTestingModule], | |
providers: [TaskApiService], | |
}); |
- Что покажут эти два alert()?
var foo = 'Hello';
(function() {
var bar = ' World';
alert(foo + bar);
})();
alert(foo + bar);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpParams } from '@angular/common/http'; | |
import { FormGroup } from '@angular/forms'; | |
import { Observable } from 'rxjs'; | |
import { environment } from '@env'; | |
import { ICompany, ID, ITeamMember, IUser } from '@lib/models'; | |
import { RansackHttpUrlEncodingCodec } from './shared/ransack-http-url-encoding.codec'; | |
@Injectable() |
NewerOlder