- Что покажут эти два alert()?
var foo = 'Hello';
(function() {
var bar = ' World';
alert(foo + bar);
})();
alert(foo + bar);
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; | |
import { FormControl, FormGroup } from '@angular/forms'; | |
import { trigger, state, style } from '@angular/animations'; | |
import { BehaviorSubject, of } from 'rxjs'; | |
import { switchMap } from 'rxjs/operators'; | |
import { untilDestroyed } from 'ngx-take-until-destroy'; | |
import { PermissionsService } from '@app/core'; | |
import { ModalComponent } from '@app/shared/components'; |
import { Component, OnDestroy, OnInit, Input, OnChanges } from '@angular/core'; | |
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; | |
import { fromEvent, Subject } from 'rxjs'; | |
import { switchMap, takeUntil } from 'rxjs/operators'; | |
import { IPictureEvent } from '@app/shared/components'; | |
import { updateFormValidation } from '@app/shared/helpers'; | |
import { ICompany, ISchool, IRegion } from '@lib/models'; |
import { Injectable } from '@angular/core'; | |
import { BehaviorSubject, Observable } from 'rxjs'; | |
import { BlogPostService } from '@app/core/services'; | |
import { MODE } from '@app/companies/components'; | |
import { IBlogPost, ICompany, ICountry, IOrganization } from '@lib/models'; | |
@Injectable() | |
export class BlogPostStateService { |
import { Injectable } from '@angular/core'; | |
import { BehaviorSubject, Observable } from 'rxjs'; | |
import { | |
ICompany, | |
ISchool, | |
IRegion, | |
IOrganization, | |
ICountry, | |
} from '@lib/models'; |
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() |
var foo = 'Hello';
(function() {
var bar = ' World';
alert(foo + bar);
})();
alert(foo + bar);
describe('TaskApiService', () => { | |
let httpClient: HttpClient; | |
let taskApiService: TaskApiService; | |
let httpTestingController: HttpTestingController; | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [HttpClientTestingModule], | |
providers: [TaskApiService], | |
}); |
describe('VideoService', () => { | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [HttpModule], | |
providers: [ | |
{ provide: VIMEO_API_URL, useValue: 'http://example.com' }, | |
VideoService, | |
{ provide: XHRBackend, useClass: MockBackend }, |
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; |