-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.html
58 lines (50 loc) · 2.98 KB
/
example.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang='en' ng-app='exampleApp'>
<head>
<meta charset='utf-8'>
<meta content='IE=edge' http-equiv='X-UA-Compatible'>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<!-- This is our own css, currently empty -->
<link href="example.css" media="all" rel="stylesheet"/>
<!-- To make this look better, just install bootstrap using bower -->
<link href="bower_components/bootstrap/dist/css/bootstrap.css" media="all" rel="stylesheet" />
<!-- Angular schema form dependencies -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/bootstrap/js/modal.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="bower_components/tv4/tv4.js"></script>
<script src="bower_components/objectpath/lib/ObjectPath.js"></script>
<script src="bower_components/angular-schema-form/dist/schema-form.js"></script>
<script src="bower_components/angular-schema-form/dist/bootstrap-decorator.js"></script>
<!-- Include the built add-on script, NOT the src/-script-->
<script src="angular-schema-form-complex-ui.js"></script>
<!-- The demo application-->
<script src="example.js"></script>
<script src="example_include.js"></script>
<title>ASF Complex UI add-on example</title>
</head>
<body ng-controller='exampleController' class="container">
<h1>Complex UI</h1>
<p>This is an example of an <a href="https://github.com/Textalk/angular-schema-form/">angular-schema-form</a> add-on.</p>
<h3>Angular schema form with a nested ASF or a specified include</h3>
<form name="selectForm" sf-schema="schema" sf-form="form" sf-model="model" ng-submit="submitted(selectForm)"></form>
<h3>Settings</h3>
<p>Modal <input type="checkbox" ng-model="form[0]['options']['modal']" ng-click="$broadcast('schemaFormRedraw')"></p>
<p>Use template (Include URI)<input type="text" ng-model="form[0]['options']['includeURI']" ng-click="$broadcast('schemaFormRedraw')"></p>
<h3>Master schema and form</h3>
<hr>
<p>The main schema is at the main controller.complexSchema, it is currently:</p>
<pre>{{schema| json : spacing}}</pre>
<p>The main form is just form. Currently the form has the following values:</p>
<pre>{{form| json : spacing}}</pre>
<h3>Nested schema and form</h3>
<hr>
<p>The schema for the input field is fetched by the function defined in options.definitionsCallback, it currently returns the schema:</p>
<pre>{{getDefinitions()["schema"]| json : spacing}}</pre>
<p>..and the form:</p>
<pre>{{getDefinitions()["form"]| json : spacing}}</pre>
<p>The main model:</p>
<pre>{{model| json : spacing}}</pre>
</body>
</html>