Skip to content

Instantly share code, notes, and snippets.

@gtrak
Created August 12, 2013 01:07
Show Gist options
  • Save gtrak/6207629 to your computer and use it in GitHub Desktop.
Save gtrak/6207629 to your computer and use it in GitHub Desktop.
Error: Invalid isolate scope definition for directive btn: <i class=@icon></i>
JS:
angular.module('myApp', []).directive('btn', function() {
return {
scope: { inner: '<i class=@icon></i>' },
template: '<button class="btn span4">{{inner}}</button>',
restrict: 'E',
replace: true,
transclude: true
}
});
HTML
<btn icon="icon-fast-forward"></btn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment