This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs (action module): update the README and the demo app for action m…
…odule - demo and docs for existingNameDirective incl. Stackblitz-Example - demo and docs for keyPipe incl. Stackblitz-Example
- Loading branch information
André Kilchenmann
committed
Sep 6, 2018
1 parent
c329865
commit fea1ad6
Showing
18 changed files
with
433 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/app/knora-ui-examples/action-demo/existing-name/existing-name.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<app-module-sub-header [demo]="partOf"></app-module-sub-header> | ||
|
||
<mat-card class="example-viewer"> | ||
|
||
<app-example-viewer [example]="existingName"></app-example-viewer> | ||
|
||
<div class="demo"> | ||
<form [formGroup]="form" class="center card"> | ||
<mat-form-field> | ||
<input matInput [formControl]="form.controls['name']" [placeholder]="'Name (should be unique)'"> | ||
<mat-hint *ngIf="formErrors.name"> | ||
{{formErrors.name}} | ||
</mat-hint> | ||
</mat-form-field> | ||
|
||
<button mat-button color="primary" [disabled]="!form.valid"> | ||
Submit | ||
</button> | ||
</form> | ||
</div> | ||
</mat-card> | ||
|
||
|
||
<h3>The following names already exists</h3> | ||
<p>Try to use one of them in the form above and see what happens</p> | ||
<ul> | ||
<li *ngFor="let n of dataMock">{{n}}</li> | ||
</ul> | ||
|
Empty file.
25 changes: 25 additions & 0 deletions
25
src/app/knora-ui-examples/action-demo/existing-name/existing-name.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ExistingNameComponent } from './existing-name.component'; | ||
|
||
describe('ExistingNameComponent', () => { | ||
let component: ExistingNameComponent; | ||
let fixture: ComponentFixture<ExistingNameComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ExistingNameComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ExistingNameComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.