Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit 9e4f956

Browse files
author
Kent C. Dodds
committed
Updating readme
1 parent 75e3d41 commit 9e4f956

File tree

1 file changed

+60
-62
lines changed

1 file changed

+60
-62
lines changed

README.md

Lines changed: 60 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
[![Build Status](https://travis-ci.org/formly-js/angular-formly.svg)](https://travis-ci.org/formly-js/angular-formly)
22
[![Coverage Status](https://img.shields.io/coveralls/formly-js/angular-formly.svg)](https://coveralls.io/r/formly-js/angular-formly)
33

4-
## Angular-Formly: Bootstrap Template
5-
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
65

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.
87

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.
10-
11-
### Demo http://formly-js.github.io/angular-formly
8+
### Demo http://angular-formly.com
129

1310
## Dependencies
14-
- Required to use Formly:
15-
- Angular
16-
- Angular-Formly
11+
- Required to use these templates:
12+
- angular
13+
- angular-formly
14+
- api-check
1715

1816
- Dev dependencies to build Formly
1917
- npm
2018

2119

2220
## Install in your project
23-
- Install [Angular-Formly](https://github.com/formly-js/angular-formly)
21+
- Install [angular-formly](https://github.com/formly-js/angular-formly)
2422

25-
- Install Angular-Formly: Bootstrap Templates
23+
- Install angular-formly: Bootstrap Templates
2624
`$ bower install angular-formly angular-formly-templates-bootstrap --save`
2725

2826
or
@@ -43,7 +41,7 @@ There were some [significant changes](https://github.com/formly-js/angular-forml
4341

4442
## Documentation
4543

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.
4745

4846
### Common Properties
4947

@@ -86,14 +84,14 @@ NOTE: All of these properties will be under the `templateOptions` property as of
8684
8785
---
8886
##### 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.
9088
9189
###### Default
9290
>`undefined`
9391
9492
---
9593
##### 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.
9795
9896
###### Default
9997
>`undefined`
@@ -111,15 +109,15 @@ Below is a detailed description of each form fields and its custom properties.
111109

112110
_Example text field_
113111
```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+
}
123121
```
124122

125123
---
@@ -133,16 +131,16 @@ _Example text field_
133131
134132
_Example textarea field_
135133
```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+
}
146144
```
147145

148146
---
@@ -153,13 +151,13 @@ _Example textarea field_
153151

154152
_Example checkbox field_
155153
```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+
}
163161
```
164162

165163
---
@@ -171,27 +169,27 @@ _Example checkbox field_
171169
172170
_Example radio field_
173171
```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+
}
195193
```
196194

197195
---
@@ -261,5 +259,5 @@ Please see the [CONTRIBUTING Guidelines](CONTRIBUTING.md).
261259

262260
## Thanks
263261

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.
265263
Thanks to [Kent C. Dodds](https://github.com/kentcdodds) for his continued support on the project.

0 commit comments

Comments
 (0)