From b5cc591ccc5ca9b8e00a2a37a3e403f967508341 Mon Sep 17 00:00:00 2001 From: mustafahlvc Date: Sat, 8 Jul 2017 19:14:57 +0300 Subject: [PATCH] Removed unnecessary components --- src/app/app.component.ts | 11 --- src/app/app.module.ts | 6 -- .../core/fuse-component/fuse.component.html | 26 ------- .../core/fuse-component/fuse.component.scss | 11 --- .../fuse-component/fuse.component.spec.ts | 25 ------- src/app/core/fuse-component/fuse.component.ts | 74 ------------------- src/app/core/muse/muse-item.model.ts | 13 ---- src/app/core/muse/muse.component.html | 10 --- src/app/core/muse/muse.component.scss | 11 --- src/app/core/muse/muse.component.spec.ts | 25 ------- src/app/core/muse/muse.component.ts | 45 ----------- 11 files changed, 257 deletions(-) delete mode 100644 src/app/core/fuse-component/fuse.component.html delete mode 100644 src/app/core/fuse-component/fuse.component.scss delete mode 100644 src/app/core/fuse-component/fuse.component.spec.ts delete mode 100644 src/app/core/fuse-component/fuse.component.ts delete mode 100644 src/app/core/muse/muse-item.model.ts delete mode 100644 src/app/core/muse/muse.component.html delete mode 100644 src/app/core/muse/muse.component.scss delete mode 100644 src/app/core/muse/muse.component.spec.ts delete mode 100644 src/app/core/muse/muse.component.ts diff --git a/src/app/app.component.ts b/src/app/app.component.ts index eea5a1d0..7d8a59b8 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,4 @@ import {Component, ElementRef, OnInit, ViewChild} from '@angular/core'; -import {FuseComponent} from './core/fuse-component/fuse.component'; -import {MuseComponent} from './core/muse/muse.component'; import {LayoutService} from './core/services/layout.service'; @Component({ @@ -13,13 +11,6 @@ export class AppComponent implements OnInit { layoutSettings: { toolbar: any, navigation: any }; - bgValue = 'red'; - title = 'app'; - @ViewChild(FuseComponent) fuseComp: ElementRef; - @ViewChild(MuseComponent) museComp: ElementRef; - - layoutVertical: boolean; - constructor(private layoutService: LayoutService) { this.layoutSettings = layoutService.getSettings(); @@ -34,8 +25,6 @@ export class AppComponent implements OnInit this.layoutSettings = newSettings; } ) - // console.warn(this.fuseComp); - // console.warn(this.museComp); } onNameChange() diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ad060aa0..c565bc98 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,8 +3,6 @@ import {NgModule} from '@angular/core'; import 'hammerjs'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {AppComponent} from './app.component'; -import {FuseDirective, FuseComponent, NameGetterComponent} from './core/fuse-component/fuse.component'; -import {MuseComponent} from './core/muse/muse.component'; import {RouterModule, Routes} from '@angular/router'; import {LayoutComponent} from './core/layout/layout.component'; import {ToolbarComponent} from './toolbar/toolbar.component'; @@ -21,10 +19,6 @@ const appRoutes: Routes = [ @NgModule({ declarations: [ AppComponent, - FuseComponent, - FuseDirective, - NameGetterComponent, - MuseComponent, LayoutComponent, ToolbarComponent ], diff --git a/src/app/core/fuse-component/fuse.component.html b/src/app/core/fuse-component/fuse.component.html deleted file mode 100644 index a811773f..00000000 --- a/src/app/core/fuse-component/fuse.component.html +++ /dev/null @@ -1,26 +0,0 @@ - - - -
-

- Name:{{name}} -

-
-

- Fuse Directive: -

-
Fuse Directive Content
-
- -

- Fuse Name Getter Component: -

- - -
- - - - \ No newline at end of file diff --git a/src/app/core/fuse-component/fuse.component.scss b/src/app/core/fuse-component/fuse.component.scss deleted file mode 100644 index 753729d6..00000000 --- a/src/app/core/fuse-component/fuse.component.scss +++ /dev/null @@ -1,11 +0,0 @@ -:host { - background: #f7f7f7; - display: block; - font-family: Roboto; - margin: 48px; - padding: 24px; - h3 { - color: #616161; - font-weight: bold; - } -} diff --git a/src/app/core/fuse-component/fuse.component.spec.ts b/src/app/core/fuse-component/fuse.component.spec.ts deleted file mode 100644 index 0651d698..00000000 --- a/src/app/core/fuse-component/fuse.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FuseComponent } from './my-new-component.component'; - -describe('FuseComponent', () => { - let component: FuseComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FuseComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FuseComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should be created', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/core/fuse-component/fuse.component.ts b/src/app/core/fuse-component/fuse.component.ts deleted file mode 100644 index 1bef6f0f..00000000 --- a/src/app/core/fuse-component/fuse.component.ts +++ /dev/null @@ -1,74 +0,0 @@ -import {Component, Directive, DoCheck, ElementRef, Input, OnInit, Output} from '@angular/core'; - -@Directive({ - selector: '[fuseDirective]' -}) -export class FuseDirective -{ - @Input('fuseDirective') fuseDirective: string; - - constructor(private el: ElementRef) - { - } -} - -@Component({ - selector: 'fuse-name-getter', - template: ` -

- {{nameValue}} - {{surname}} -

- ` -}) -export class NameGetterComponent implements OnInit -{ - surname: string; - @Input('nameValue') nameValue: string; - - constructor() - { - this.surname = 'HELVACI'; - } - - ngOnInit() - { - this.surname = 'Yemen'; - - } -} - -@Component({ - selector : 'fuse-fuse', - templateUrl: './fuse.component.html', - styleUrls : ['./fuse.component.scss'] -}) -export class FuseComponent implements OnInit, DoCheck -{ - name2: string; - @Input('name') name: string; - - - constructor() - { - } - - public changeName(name) - { - console.info('name change emit'); - - } - - ngOnInit() - { - this.name2 = this.name; - console.log(this.name); - console.info('on init'); - } - - ngDoCheck() - { - console.info('ngDoCheck'); - - } -} diff --git a/src/app/core/muse/muse-item.model.ts b/src/app/core/muse/muse-item.model.ts deleted file mode 100644 index 55277f5f..00000000 --- a/src/app/core/muse/muse-item.model.ts +++ /dev/null @@ -1,13 +0,0 @@ -export class MuseItem -{ - name: string; - - constructor(name: string) - { - this.name = name; - } - save() - { - console.info('saved', this.name); - } -} diff --git a/src/app/core/muse/muse.component.html b/src/app/core/muse/muse.component.html deleted file mode 100644 index a18a9c98..00000000 --- a/src/app/core/muse/muse.component.html +++ /dev/null @@ -1,10 +0,0 @@ -

- muse works! - -

- - \ No newline at end of file diff --git a/src/app/core/muse/muse.component.scss b/src/app/core/muse/muse.component.scss deleted file mode 100644 index 753729d6..00000000 --- a/src/app/core/muse/muse.component.scss +++ /dev/null @@ -1,11 +0,0 @@ -:host { - background: #f7f7f7; - display: block; - font-family: Roboto; - margin: 48px; - padding: 24px; - h3 { - color: #616161; - font-weight: bold; - } -} diff --git a/src/app/core/muse/muse.component.spec.ts b/src/app/core/muse/muse.component.spec.ts deleted file mode 100644 index dde218e9..00000000 --- a/src/app/core/muse/muse.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { MuseComponent } from './muse.component'; - -describe('MuseComponent', () => { - let component: MuseComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ MuseComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(MuseComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should be created', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/core/muse/muse.component.ts b/src/app/core/muse/muse.component.ts deleted file mode 100644 index 80b75c7e..00000000 --- a/src/app/core/muse/muse.component.ts +++ /dev/null @@ -1,45 +0,0 @@ -import {Component, ElementRef, HostBinding, Input, OnInit, Renderer2, ViewChild} from '@angular/core'; -import {MuseItem} from './muse-item.model'; - -@Component({ - selector : 'fuse-muse', - templateUrl: './muse.component.html', - styleUrls : ['./muse.component.scss'] -}) -export class MuseComponent implements OnInit -{ - items: MuseItem[] = []; - elRef: ElementRef; - private renderer: Renderer2; - @ViewChild('museInput') museInput: ElementRef; - @Input() nameChanged; - @Input() @HostBinding('style.backgroundColor') bgColor: string; - - - /* @Input() set bgColor(bgValue) - { - //this.elRef.nativeElement.style.backgroundColor = bgValue; - // this.museInput.nativeElement.style.backgroundColor = bgValue; - //this.renderer.setStyle(this.elRef.nativeElement, 'backgroundColor', bgValue); - }; - */ - constructor(elRef: ElementRef, renderer: Renderer2) - { - this.elRef = elRef; - this.renderer = renderer; - } - - onNameChange() - { - } - - ngOnInit() - { - console.warn(this.museInput.nativeElement.value); - const sercanItem = new MuseItem('sercan'); - this.items.push(sercanItem); - sercanItem.save(); - - } - -}