Removed unnecessary components

This commit is contained in:
mustafahlvc 2017-07-08 19:14:57 +03:00
parent c3e241c81c
commit b5cc591ccc
11 changed files with 0 additions and 257 deletions

View File

@ -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()

View File

@ -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
],

View File

@ -1,26 +0,0 @@
<button md-raised-button>Raised button</button>
<md-icon class="mat-icon material-icons" role="img" aria-hidden="true">home</md-icon>
<hr>
<h3>
Name:{{name}}
</h3>
<hr>
<h3>
Fuse Directive:
</h3>
<div fuseDirective>Fuse Directive Content</div>
<hr>
<h3>
Fuse Name Getter Component:
</h3>
<fuse-name-getter [nameValue]="name"></fuse-name-getter>
<hr>
<input type="text" [value]="name2" (change)="name2=$event.target.value">
<button md-button (click)="changeName('sercan')">
{{name2}}
</button>

View File

@ -1,11 +0,0 @@
:host {
background: #f7f7f7;
display: block;
font-family: Roboto;
margin: 48px;
padding: 24px;
h3 {
color: #616161;
font-weight: bold;
}
}

View File

@ -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<FuseComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FuseComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FuseComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@ -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: `
<h1>
{{nameValue}}
{{surname}}
</h1>
`
})
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');
}
}

View File

@ -1,13 +0,0 @@
export class MuseItem
{
name: string;
constructor(name: string)
{
this.name = name;
}
save()
{
console.info('saved', this.name);
}
}

View File

@ -1,10 +0,0 @@
<p>
muse works!
<input type="text" #museInput value="secoo">
</p>
<ul>
<li *ngFor="let item of items">
{{item.name}}
</li>
</ul>

View File

@ -1,11 +0,0 @@
:host {
background: #f7f7f7;
display: block;
font-family: Roboto;
margin: 48px;
padding: 24px;
h3 {
color: #616161;
font-weight: bold;
}
}

View File

@ -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<MuseComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MuseComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MuseComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@ -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();
}
}