Skip to content

Instantly share code, notes, and snippets.

@ronapelbaum
Created July 13, 2016 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronapelbaum/c846e245ebd5e36975213b44685a611c to your computer and use it in GitHub Desktop.
Save ronapelbaum/c846e245ebd5e36975213b44685a611c to your computer and use it in GitHub Desktop.
test a directive with scope
beforeEach(inject(function($compile, $rootScope) {
scope = $rootScope.$new();
scope.text = 'Hello World';
element = angular.element("<div upper-case-scope text='text'></div>");
$compile(element)(scope);
scope.$apply();
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment