scopeInit.js 265 B

1234567891011
  1. angular.module("robware").directive("scopeInit", function(){
  2. return {
  3. restrict : 'E',
  4. link:function(scope, element, attributes){
  5. var content=element[0].innerHTML.trim();
  6. scope[attributes.value]=JSON.parse(content);
  7. element.remove();
  8. }
  9. }
  10. });