Skip to content
Snippets Groups Projects
Commit 1bc8d4dd authored by Xiao Gui's avatar Xiao Gui
Browse files

fixing linting

parent 4a09056a
No related branches found
No related tags found
No related merge requests found
import { TestBed } from '@angular/core/testing';
import { SlServiceService } from './sl-service.service';
import { SpotLightModule } from './spot-light.module';
describe('SlServiceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: SlServiceService = TestBed.get(SlServiceService);
expect(service).toBeTruthy();
});
});
// TO BE IMPLEMENTED
})
......@@ -21,7 +21,7 @@ export class SlServiceService implements OnDestroy{
this.cf = cfr.resolveComponentFactory(SpotlightBackdropComponent)
}
public showBackdrop(tmp?:TemplateRef<any>){
public showBackdrop(tmp?: TemplateRef<any>){
this.hideBackdrop()
this.backdropRef = this.cf.create(this.injector)
......
import { Directive, Input, TemplateRef, OnDestroy } from '@angular/core';
import { Directive, TemplateRef } from '@angular/core';
import { SlServiceService } from './sl-service.service';
@Directive({
......@@ -8,12 +8,12 @@ import { SlServiceService } from './sl-service.service';
export class SlSpotlightDirective {
constructor(
private slService:SlServiceService
private slService: SlServiceService
) {
}
showBackdrop(tmpl?:TemplateRef<any>){
showBackdrop(tmpl?: TemplateRef<any>){
this.slService.showBackdrop(tmpl)
}
}
......@@ -5,7 +5,4 @@ import { Directive } from '@angular/core';
})
export class SpotLightOverlayDirective {
constructor() {
}
}
......@@ -3,23 +3,6 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SpotlightBackdropComponent } from './spotlight-backdrop.component';
describe('SpotlightBackdropComponent', () => {
let component: SpotlightBackdropComponent;
let fixture: ComponentFixture<SpotlightBackdropComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SpotlightBackdropComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SpotlightBackdropComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
// TO BE IMPLEMENTED
});
......@@ -27,15 +27,14 @@ export class SpotlightBackdropComponent {
// TODO use DI for service injection ?
public slService: SlServiceService
constructor() { }
@HostBinding('@onShownOnDismiss')
animation: string = 'attach'
@HostListener('click', ['$event'])
clickHandler(ev:MouseEvent){
clickHandler(ev: MouseEvent){
this.slService && this.slService.onClick.next(ev)
}
insert:TemplateRef<any>
insert: TemplateRef<any>
}
import { Component, OnInit } from "@angular/core";
import { Observable, timer, interval } from "rxjs";
import { Component } from "@angular/core";
import { Observable, interval } from "rxjs";
import { mapTo, startWith, scan } from "rxjs/operators";
@Component({
......@@ -10,7 +10,7 @@ import { mapTo, startWith, scan } from "rxjs/operators";
]
})
export class TryMeComponent implements OnInit{
export class TryMeComponent{
public interval$: Observable<any>
constructor(){
......@@ -27,8 +27,4 @@ export class TryMeComponent implements OnInit{
'Drag around',
'Zoom in / Zoom out'
]
ngOnInit(){
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment