forked from inveniosoftware-contrib/ng2-json-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.component.html
28 lines (26 loc) · 931 Bytes
/
app.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<ng-template let-item="item" #referenceTemplate>
<div class="reference-template-container" [ngSwitch]="item.hasIn(['record', '$ref'])">
<span *ngSwitchCase="true">
<i class="fa fa-check-circle success" aria-hidden="true"></i>
<a href="{{item.getIn(['record', '$ref'])}}" target="_blank">{{item.getIn(['reference', 'misc', 0])}}</a>
</span>
<span *ngSwitchDefault>
<i class="fa fa-exclamation-triangle warning" aria-hidden="true"></i>
{{item.getIn(['reference', 'misc', 0])}}
</span>
</div>
</ng-template>
<ng-template #patchesHeaderTemplate>
<span>Patches (Conflicts) actions:</span>
</ng-template>
<json-editor *ngIf="record && schema"
[config]="config"
[(record)]="record"
[(jsonPatches)]="patches"
[problemMap]="problemMap"
[schema]="schema"
[templates]="{
referenceTemplate: referenceTemplate,
patchesHeaderTemplate: patchesHeaderTemplate
}">
</json-editor>