add karma test

- add tests
- add support of angular 1.2.0-rc.2