Skip to content

Commit 38d6521

Browse files
代码bug修复
1 parent 90b7cf8 commit 38d6521

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Chapter4.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Figure 4-1. Guthub: A simple recipe management application
110110

111111
services.factory('MultiRecipeLoader', ['Recipe', '$q', function(Recipe, q){
112112
return function(){
113-
var delay = $.defer();
113+
var delay = $q.defer();
114114
Recipe.query(function(recipes){
115115
delay.resolve(recipes);
116116
}, function(){
@@ -244,7 +244,7 @@ Figure 4-1. Guthub: A simple recipe management application
244244
```js
245245
// This file is app/scripts/directives/directives.js
246246

247-
var directive = angular.module('guthub.directives', []);
247+
var directives = angular.module('guthub.directives', []);
248248

249249
directives.directive('butterbar', ['$rootScope', function($rootScope){
250250
return {
@@ -255,7 +255,7 @@ Figure 4-1. Guthub: A simple recipe management application
255255
element.removeClass('hide');
256256
});
257257

258-
$routeScope.$on('$routeChangeSuccess', function(){
258+
$rootScope.$on('$routeChangeSuccess', function(){
259259
element.addClass('hide');
260260
});
261261
}

0 commit comments

Comments
 (0)