Commit e50ebed2 authored by Pascal Hartig's avatar Pascal Hartig

Fixed r.js compression

- Correctly wrap todoFocus directive to work after minification.
- Require angular dependency in app.js
parent e19c80f2
'use strict'; 'use strict';
define([], function () { define(['angular'], function (angular) {
return angular.module('todomvc', []); return angular.module('todomvc', []);
}); });
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Directive that places focus on the element it is applied to when the expression it binds to evaluates to true. * Directive that places focus on the element it is applied to when the expression it binds to evaluates to true.
*/ */
define(['app'], function ( app ) { define(['app'], function ( app ) {
app.directive('todoFocus', function( $timeout ) { app.directive('todoFocus', ['$timeout', function( $timeout ) {
return function( scope, elem, attrs ) { return function( scope, elem, attrs ) {
scope.$watch(attrs.todoFocus, function( newval ) { scope.$watch(attrs.todoFocus, function( newval ) {
if ( newval ) { if ( newval ) {
...@@ -13,5 +13,5 @@ define(['app'], function ( app ) { ...@@ -13,5 +13,5 @@ define(['app'], function ( app ) {
} }
}); });
}; };
}); }]);
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment