You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ee01566ca4 | 10 years ago | |
---|---|---|
src | 10 years ago | |
tests | 10 years ago | |
.gitignore | 10 years ago | |
.jshintrc | 10 years ago | |
LICENSE | 10 years ago | |
README.md | 10 years ago | |
angular-diff.js | 10 years ago | |
angular-diff.min.js | 10 years ago | |
bower.json | 10 years ago | |
gulpfile.js | 10 years ago | |
karma.conf.js | 10 years ago | |
package.json | 10 years ago |
README.md
angular-diff
Diff filter for angular.js. Show inline text diff in your page
I took the idea and the algorithm (and the code) from http://ejohn.org/projects/javascript-diff-algorithm/
Install
To use angular-diff you have to:
-
install angular-diff with bower:
bower install angular-diff
-
In your
index.html
, include the angular-diff file
In your module declaration you have to include the diff module
var module = angular.module('yourModule', [
...
'diff',
]);
USAGE
It's a filter, you use it in your html like this:
```{{text|diff:otherText}}```
This will show the diff between ```text``` and ```otherText```
DEVELOPMENT
Remember to install all dependencies:
$ npm install -g gulp // It's like grunt but cooler
$ npm install
$ bower install
To launch tests simply run
gulp karma
To build and minify simply run
gulp build