Created
July 13, 2016 08:56
-
-
Save ronapelbaum/c846e245ebd5e36975213b44685a611c to your computer and use it in GitHub Desktop.
test a directive with scope
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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