add isolate scope to directive

- add isolate scope
- change pagination algorithm
- change names of parameters
add custom templates support