Skip to content

Instantly share code, notes, and snippets.

@IamAdamJowett
Created September 16, 2014 10:46
Show Gist options
  • Save IamAdamJowett/944238e6c0826eed1a09 to your computer and use it in GitHub Desktop.
Save IamAdamJowett/944238e6c0826eed1a09 to your computer and use it in GitHub Desktop.
Dynamically add a directives in AngularJS
var table = angular.element(document.createElement('pc-table'));
var tableElement = $compile(table)($scope);
angular.element(elem.parent()).append(table);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment