-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49feae1
commit a931048
Showing
14 changed files
with
162 additions
and
16 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Empty file.
2 changes: 2 additions & 0 deletions
2
frontend/src/app/document-component/document-component.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,2 @@ | ||
|
||
<mat-slider min="1" max="100" step="1" value="1"></mat-slider> |
25 changes: 25 additions & 0 deletions
25
frontend/src/app/document-component/document-component.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 { DocumentComponentComponent } from './document-component.component'; | ||
|
||
describe('DocumentComponentComponent', () => { | ||
let component: DocumentComponentComponent; | ||
let fixture: ComponentFixture<DocumentComponentComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ DocumentComponentComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DocumentComponentComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
78 changes: 78 additions & 0 deletions
78
frontend/src/app/document-component/document-component.component.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,78 @@ | ||
import {Component, NgModule, OnInit, ViewChild} from '@angular/core'; | ||
import {Location} from '@angular/common'; | ||
import {ActivatedRoute} from '@angular/router'; | ||
import {MyServiceService} from '../service/my-service.service'; | ||
import {ComboBoxComponent} from '../combo-box/combo-box.component'; | ||
import {NoneComponent} from 'angular7-json-schema-form'; | ||
import { MatSliderModule } from '@angular/material/slider'; | ||
|
||
@Component({ | ||
selector: 'app-document-component', | ||
templateUrl: './document-component.component.html', | ||
styleUrls: ['./document-component.component.css'] | ||
}) | ||
export class DocumentComponentComponent implements OnInit { | ||
|
||
constructor( | ||
private location: Location, | ||
private route: ActivatedRoute, | ||
private service: MyServiceService | ||
) { } | ||
|
||
@NgModule ({ | ||
imports: [ | ||
MatSliderModule, | ||
] | ||
}) | ||
|
||
@ViewChild(ComboBoxComponent) comboBoxReference; | ||
uid = ''; | ||
name = 'Angular 7'; | ||
jsonFormOptions = { | ||
loadExternalAssets: true, | ||
}; | ||
schemaname = ''; | ||
schema = {}; | ||
data = {}; | ||
load = false; | ||
form = { | ||
schema: {}, | ||
data: {}, | ||
layout: [] | ||
}; | ||
props = []; | ||
allprops = {}; | ||
|
||
template = {}; | ||
|
||
chosenprops = []; | ||
|
||
yourWidgets = { | ||
submit: NoneComponent, | ||
}; | ||
copyProp; | ||
|
||
|
||
ngOnInit() { | ||
this.route.paramMap.subscribe(params => { | ||
this.uid = params.get('uid'); | ||
this.load = false; | ||
// this.getSchemaNode(this.uid); | ||
this.route.queryParamMap.subscribe(query => { | ||
this.template = JSON.parse(query.get('template')); | ||
this.getNodeTemplate(this.uid); | ||
}); | ||
// this.getNodeTemplate(this.uid); | ||
|
||
}); | ||
} | ||
|
||
getNodeTemplate(uid) { | ||
this.service.getDocTemplate(uid) | ||
.subscribe(returnedTemplate => { | ||
this.template = returnedTemplate; | ||
console.log(returnedTemplate); | ||
}); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
|
||
html, body { height: 100%; } | ||
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } |
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