From 324374ac8ff53387b5088ccca474cd4852bdf07d Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Sat, 7 Nov 2015 11:51:48 -0800 Subject: [PATCH 1/2] linter fixes --- app/js/directives/example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/directives/example.js b/app/js/directives/example.js index e5f389f8..29890caa 100644 --- a/app/js/directives/example.js +++ b/app/js/directives/example.js @@ -9,9 +9,9 @@ function ExampleDirective() { title: '@', message: '@exampleDirective' }, - link: (scope, element, attrs) => { + link: (scope, element) => { element.on('click', () => { - alert('Element clicked: ' + scope.message); + window.alert('Element clicked: ' + scope.message); }); } }; From 4994907d1620a0a7df8758d1710578f767aabbf4 Mon Sep 17 00:00:00 2001 From: Jake Marsh Date: Sat, 7 Nov 2015 12:06:29 -0800 Subject: [PATCH 2/2] single quotes --- test/unit/directives/example_spec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/directives/example_spec.js b/test/unit/directives/example_spec.js index 9074904a..8247493e 100644 --- a/test/unit/directives/example_spec.js +++ b/test/unit/directives/example_spec.js @@ -13,8 +13,8 @@ describe('Unit: ExampleDirective', function() { angular.mock.inject(function($compile, $rootScope) { scope = $rootScope; element = angular.element('
Sample Directive
'); - scope.title = "A sample title"; - scope.message = "It doesn't hurt."; + scope.title = 'A sample title'; + scope.message = 'It doesn\'t hurt.'; $compile(element)(scope); scope.$digest(); }); @@ -22,14 +22,14 @@ describe('Unit: ExampleDirective', function() { it('should bind itself to the element', function() { element.triggerHandler('click'); - expect(window.alert).toHaveBeenCalledWith("Element clicked: It doesn't hurt."); + expect(window.alert).toHaveBeenCalledWith('Element clicked: It doesn\'t hurt.'); }); it('should update its bindings', function() { - scope.message = "It hurts a bit."; + scope.message = 'It hurts a bit.'; scope.$digest(); element.triggerHandler('click'); - expect(window.alert).toHaveBeenCalledWith("Element clicked: It hurts a bit."); + expect(window.alert).toHaveBeenCalledWith('Element clicked: It hurts a bit.'); }); it('should bind a title property to its template', function() {