Mercurial > hg > ugly-duckling
changeset 9:1fcc8c9ec54c
Remove a now unused component.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 27 Oct 2016 08:19:45 +0100 |
parents | a50a4e814ff3 |
children | 0b24b8ae62f8 |
files | src/app/app.module.ts src/app/simple-form/simple-form.component.spec.ts src/app/simple-form/simple-form.component.ts |
diffstat | 3 files changed, 0 insertions(+), 73 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/app.module.ts Wed Oct 26 17:26:31 2016 +0100 +++ b/src/app/app.module.ts Thu Oct 27 08:19:45 2016 +0100 @@ -4,7 +4,6 @@ import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; -import { SimpleFormComponent } from './simple-form/simple-form.component'; import {MailService} from "./mail.service"; import {MaterialModule} from "@angular/material"; import { WaveformComponent } from './waveform/waveform.component'; @@ -12,7 +11,6 @@ @NgModule({ declarations: [ AppComponent, - SimpleFormComponent, WaveformComponent ], imports: [
--- a/src/app/simple-form/simple-form.component.spec.ts Wed Oct 26 17:26:31 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* tslint:disable:no-unused-variable */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { DebugElement } from '@angular/core'; - -import { SimpleFormComponent } from './simple-form.component'; - -describe('SimpleFormComponent', () => { - let component: SimpleFormComponent; - let fixture: ComponentFixture<SimpleFormComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ SimpleFormComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(SimpleFormComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -});
--- a/src/app/simple-form/simple-form.component.ts Wed Oct 26 17:26:31 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -import { - Component, OnInit, Input, Output, EventEmitter, - ViewEncapsulation, ViewChild, ElementRef -} from '@angular/core'; - -@Component({ - encapsulation: ViewEncapsulation.Emulated, - selector: 'app-simple-form', - template: ` - <input #myInput type="text" - [(ngModel)]="message" - [ngClass]="{mousedown: isMousedown}" - (mousedown)="isMousedown = true" - (mouseup)="isMousedown = false" - (mouseleave)="isMousedown = false" - /> - <pre #testPre>Hi</pre> - <pre>{{testHi}}</pre> - <button (click)="update.emit({text:message})">Click me!</button> - -`, - styleUrls: ['./simple-form.component.css'] -}) -export class SimpleFormComponent implements OnInit { - - @ViewChild('testPre') testPre: ElementRef; - testHi = 'Hi'; - - isMousedown; - - @Input() message; - - @Output() update = new EventEmitter(); - - constructor() { - // setInterval(() => this.message = Math.random().toString(), 1000); - } - - ngOnInit() { - this.testPre.nativeElement.innerHTML = Math.random().toString(); - } - -}