Update index.js

Denis Bondarenko changed to support templates, inlined with script tag like ...type="text/ng-template"