replace option in angular directives is deprecated

Added a demo and fixed #16
fix: can't make assumptions about parent element
Merge pull request #18 from cotag/mixin

merge branch mixin