Skip to content

Commit d9c1b83

Browse files
added usage and demo to readmy
1 parent a34bbb8 commit d9c1b83

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Angular URL-Encode Filter
22

33

4+
## Demo
5+
6+
[Plunkr](http://plnkr.co/edit/oPJZWt)
7+
8+
49
## Installation
510

611
`$ bower install angular-url-encode --save`
@@ -14,12 +19,22 @@ angular.module('myModule', ['bc.AngularUrlEncode']);
1419

1520
## Usage
1621

17-
__coming soon__
22+
As a filter in the DOM:
1823

24+
```
25+
{{ myPlainString | bcEncode }}
26+
{{ encodedString | bcDecode }}
27+
```
1928

20-
## Demo
29+
Using the `$filter` service in JS:
2130

22-
__coming soon__
31+
```
32+
// Encode
33+
this.encodedString = $filter('bcEncode')(myPlainString);
34+
35+
// Decode
36+
this.decodedString = $filter('bcDecode')(encodedString);
37+
```
2338

2439

2540
- - -
@@ -30,3 +45,10 @@ __coming soon__
3045
* `npm run build` - produces production version of your library under the `dist` folder
3146
* `npm run dev` - produces development version of your library and runs a watcher
3247

48+
49+
- - -
50+
51+
52+
[All idea and code contributions
53+
welcome!](https://github.com/benjamincharity/angular-url-encode/issues)
54+

0 commit comments

Comments
 (0)