Skip to content

Commit 7e1a215

Browse files
committed
Updated docs with example of script loading
Order is important folks! Probably fixes #62
1 parent ab2d368 commit 7e1a215

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ You can also just download the contents of the `dist/` folder and add dependenci
9494

9595
### Dependencies
9696

97-
Schema form has a lot of dependencies, most of which are optional. Therefor
98-
99-
Schema Form depends on:
97+
Schema form has a lot of dependencies, most of which are optional. Schema Form depends on:
10098

10199
1. [AngularJS](https://angularjs.org/) version 1.3.x is recomended. Version 1.2.x
102100
has some limitation. See [known limitations](docs/knownlimitations.md).
@@ -109,6 +107,7 @@ If you install via bower you get all of the above except bootstrap since we
109107
don't want to push a certain version or flavor on you. Also make
110108
sure you got the angular version you actually want.
111109

110+
112111
#### Additional dependecies
113112

114113
1. If you want to use the date picker, you'll also need [jQuery](https://github.com/jquery/jquery)
@@ -118,6 +117,24 @@ sure you got the angular version you actually want.
118117

119118
The minified files include templates - no need to load additional HTML files.
120119

120+
### Script Loading
121+
122+
Schema form is split into two main files, `dist/schema-form.min.js` and
123+
`dist/boostrap-decorator.min.js` and they need be loaded in that order. AngularJ,
124+
[tv4](https://github.com/geraintluff/tv4) and [objectpath](https://github.com/mike-marcacci/objectpath)
125+
also needs to be loaded *before* Schema Form.
126+
127+
128+
```html
129+
<script type="text/javascript" src="../bower_components/angular/angular.min.js"></script>
130+
<script type="text/javascript" src="../bower_components/angular-sanitize/angular-sanitize.min.js"></script>
131+
<script type="text/javascript" src="bower_components/tv4/tv4.js"></script>
132+
<script type="text/javascript" src="bower_components/objectpath/lib/ObjectPath.js"></script>
133+
<script type="text/javascript" src="bower_components/angular-schema-form/dist/schema-form.min.js"></script>
134+
<script type="text/javascript" src="bower_components/angular-schema-form/dist/bootstrap-decorator.min.js"></script>
135+
```
136+
137+
121138
Add-ons
122139
------
123140
There is currently only one add-on, a date picker using the excellent

examples/bootstrap-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h3>Schema</h3>
7272
<script type="text/javascript" src="../bower_components/pickadate/lib/picker.date.js"></script>
7373
<script type="text/javascript" src="../bower_components/pickadate/lib/translations/sv_SE.js"></script>
7474

75-
<script type="text/javascript" src="../dist/schema-form.js"></script>
75+
<script type="text/javascript" src="../dist/schema-form.min.js"></script>
7676
<script type="text/javascript" src="../dist/bootstrap-decorator.min.js"></script>
7777
<script type="text/javascript" src="../dist/bootstrap-datepicker.min.js"></script>
7878
<script type="text/javascript">

0 commit comments

Comments
 (0)