试图在John Papa Pluralsight Video教程中实现会话部分时。 我得到了以下错误:Breeze脚本中已弃用方法的版本问题
Uncaught TypeError: Object # has no method 'extendQ'
(function() {
'use strict';
var app = angular.module('app', [
// Angular modules
'ngAnimate', // animations
'ngRoute', // routing
'ngSanitize', // sanitizes html bindings (ex: sidebar.js)
// Custom modules
'common', // common functions, logger, spinner
'common.bootstrap', // bootstrap dialog wrapper functions
// 3rd Party Modules
'ui.bootstrap', // ui-bootstrap (ex: carousel, pagination, dialog)
//'breeze.angular.q'
]);
// Handle routing errors and success events
app.run(['$route', '$rootScope', '$q', function ($route, $rootScope, $q) {
// Include $route to kick start the router.
breeze.core.extendQ($rootScope, $q);
//use$q($rootScope,$q);
}]);
})();
知道,那我的工作在微风的版本更新比原始视频的使用是很重要的。
我搜索的breeze website一些答案我发现这一点:
The to$q has been deprecated. It is superseded by the Breeze Angular Service.
但我没有做它的教程示例工作。如何用新的更改已弃用的实现?
UPDATE:
此链接帮助解决问题:
http://www.breezejs.com/documentation/breeze-angular-service
谢谢!我可以在跟踪视频的同时解决同样的错误。 – tympaniplayer
Hehehe ...刚刚摆脱这种'breeze.to $ q.shim.js'的时候到了这里。 –