-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (37 loc) · 1.8 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<title>JSON Dummy</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="build/libs.css">
<link rel="stylesheet" type="text/css" href="build/app.css">
<script src="build/libs.js"></script>
<script src="build/app.js"></script>
</head>
<body ng-app="JsonDummy" ng-controller="JsonDummyController as ctrl">
<!--<md-button class="md-raised">create class</md-button>-->
<form name="classForm" id="editor" novalidate>
<div ng-repeat="property in ctrl.properties">
<md-input-container class="vTop">
<label>Property name</label>
<input name="propertyName" ng-model="property.name" required>
<div ng-messages="classForm.propertyName.$error" >
<div ng-message="required">This is required!</div>
</div>
</md-input-container>
<md-input-container class="vTop">
<label>Value type</label>
<md-select ng-model="property.selectedValueType">
<md-optgroup label="{{category.name}}" ng-repeat="category in ctrl.categories">
<md-option ng-value="type" ng-repeat="type in category.types">{{type.name}}</md-option>
</md-optgroup>
</md-select>
</md-input-container>
</div>
<md-button ng-click="ctrl.addNewProperty()">+ add property</md-button>
</form>
<md-button type="submit" class="md-raised generate-button" ng-click="ctrl.generate()" ng-disabled="classForm.$touched && classForm.$invalid">generate JSON</md-button>
<pre class="json-result" ng-if="ctrl.jsonResult">{{ctrl.jsonResult}}</pre>
</body>
</html>