You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
This is a template for Angular-Formly which adds templates with classes specific to bootstrap. Each field is wrapped in a div. This library is not standalone and requires angular-formly to be present and loaded.
4
+
## angular-formly: Bootstrap Template
6
5
7
-
### NOTICE: UPGRADING FROM 2.0 to 3.0?
6
+
This is a template for angular-formly which adds templates with classes specific to bootstrap. Each field is wrapped in a div. This library is not standalone and requires angular-formly to be present and loaded.
8
7
9
-
There were some [significant changes](https://github.com/formly-js/angular-formly/blob/master/CHANGELOG.md) that you'll want to be aware of. In order to upgrade and get all the cool features, you're going to need to change your field configurations. [Here is a tool](http://jsbin.com/ruwoke) that should help make that process easier. Also, if you are not able to update the configuration very easily, see [this issue](https://github.com/formly-js/angular-formly/issues/162) for ideas on how to ease things a little.
@@ -43,7 +41,7 @@ There were some [significant changes](https://github.com/formly-js/angular-forml
43
41
44
42
## Documentation
45
43
46
-
See [Angular-Formly](https://github.com/formly-js/angular-formly) for formly core documentation.
44
+
See [angular-formly](http://docs.angular-formly.com) for formly core documentation.
47
45
48
46
### Common Properties
49
47
@@ -86,14 +84,14 @@ NOTE: All of these properties will be under the `templateOptions` property as of
86
84
87
85
---
88
86
##### addonLeft (object)
89
-
>`addonLeft` is used to add an add-on on the left of a field. The object accepts two properties: `text` that sets a simple text and `class` that sets classes to the add-on.
87
+
>`addonLeft` is used to add an add-on on the left of a field. The object accepts three properties: `text` that sets a simple text, `onClick` will add a `cursor:pointer` and an ng-click to the addon (invoked with the options and scope), and `class` that sets classes to the add-on.
90
88
91
89
###### Default
92
90
>`undefined`
93
91
94
92
---
95
93
##### addonRight (object)
96
-
>`addonRight` is used to add an add-on on the right of a field. The object accepts two properties: `text` that sets a simple text and `class` that sets classes to the add-on.
94
+
>`addonRight` is used to add an add-on on the right of a field. The object accepts three properties: `text` that sets a simple text, `onClick` will add a `cursor:pointer` and an ng-click to the addon (invoked with the options and scope), and `class` that sets classes to the add-on.
97
95
98
96
###### Default
99
97
>`undefined`
@@ -111,15 +109,15 @@ Below is a detailed description of each form fields and its custom properties.
111
109
112
110
_Example text field_
113
111
```json
114
-
{
115
-
"type": "text",
116
-
"key": "firstName",
117
-
"templateOptions": {
118
-
"type": "email", // or url, or text, etc.
119
-
"placeholder": "jane doe",
120
-
"label": "First name"
121
-
}
122
-
}
112
+
{
113
+
"type": "input",
114
+
"key": "firstName",
115
+
"templateOptions": {
116
+
"type": "email", // or url, or text, etc.
117
+
"placeholder": "jane doe",
118
+
"label": "First name"
119
+
}
120
+
}
123
121
```
124
122
125
123
---
@@ -133,16 +131,16 @@ _Example text field_
133
131
134
132
_Example textarea field_
135
133
```json
136
-
{
137
-
"type": "textarea",
138
-
"key": "about",
139
-
"templateOptions": {
140
-
"placeholder": "I like puppies",
141
-
"label": "Tell me about yourself",
142
-
"rows": 4,
143
-
"cols": 15
144
-
}
145
-
}
134
+
{
135
+
"type": "textarea",
136
+
"key": "about",
137
+
"templateOptions": {
138
+
"placeholder": "I like puppies",
139
+
"label": "Tell me about yourself",
140
+
"rows": 4,
141
+
"cols": 15
142
+
}
143
+
}
146
144
```
147
145
148
146
---
@@ -153,13 +151,13 @@ _Example textarea field_
153
151
154
152
_Example checkbox field_
155
153
```json
156
-
{
157
-
"type": "checkbox",
158
-
"key": "checkThis",
159
-
"templateOptions": {
160
-
"label": "Check this box"
161
-
}
162
-
}
154
+
{
155
+
"type": "checkbox",
156
+
"key": "checkThis",
157
+
"templateOptions": {
158
+
"label": "Check this box"
159
+
}
160
+
}
163
161
```
164
162
165
163
---
@@ -171,27 +169,27 @@ _Example checkbox field_
171
169
172
170
_Example radio field_
173
171
```json
174
-
{
175
-
"key": "triedEmber",
176
-
"type": "radio",
177
-
"templateOptions": {
178
-
"label": "Have you tried EmberJs yet?",
179
-
"options": [
180
-
{
181
-
"name": "Yes, and I love it!",
182
-
"value": "yesyes"
183
-
},
184
-
{
185
-
"name": "Yes, but I'm not a fan...",
186
-
"value": "yesno"
187
-
},
188
-
{
189
-
"name": "Nope",
190
-
"value": "no"
191
-
}
192
-
]
193
-
}
194
-
}
172
+
{
173
+
"key": "triedEmber",
174
+
"type": "radio",
175
+
"templateOptions": {
176
+
"label": "Have you tried EmberJs yet?",
177
+
"options": [
178
+
{
179
+
"name": "Yes, and I love it!",
180
+
"value": "yesyes"
181
+
},
182
+
{
183
+
"name": "Yes, but I'm not a fan...",
184
+
"value": "yesno"
185
+
},
186
+
{
187
+
"name": "Nope",
188
+
"value": "no"
189
+
}
190
+
]
191
+
}
192
+
}
195
193
```
196
194
197
195
---
@@ -261,5 +259,5 @@ Please see the [CONTRIBUTING Guidelines](CONTRIBUTING.md).
261
259
262
260
## Thanks
263
261
264
-
A special thanks to [Nimbly](http://gonimbly.com) for creating/sponsoring Angular-Formly's development.
262
+
A special thanks to [Nimbly](http://gonimbly.com) for creating/sponsoring angular-formly's development.
265
263
Thanks to [Kent C. Dodds](https://github.com/kentcdodds) for his continued support on the project.
0 commit comments