adding dashbord
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
}
|
||||
</style>
|
||||
<p *ngFor="let line of lines()">{{line}}</p>
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TextWidgetComponent } from './text-widget.component';
|
||||
|
||||
describe('TextWidgetComponent', () => {
|
||||
let component: TextWidgetComponent;
|
||||
let fixture: ComponentFixture<TextWidgetComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TextWidgetComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TextWidgetComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-text-widget',
|
||||
templateUrl: './text-widget.component.html'
|
||||
})
|
||||
export class TextWidgetComponent {
|
||||
@Input()
|
||||
text = "";
|
||||
|
||||
lines(): string[]{
|
||||
return this.text.split(/\r?\n/);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user