|
AngularJS 迁移资源
|
显著变更和重大变更汇总
|
|---|---|
|
• $location 开始使用 '!' 代替空字符串,作为 hash-bang URL 的默认 hash-prefix
• $compile 默认不再对组件/指令控制器实例预先分配绑定
• 出于安全原因,http 开始对 JSONP 请求施加额外限制
• jqLite 经过更新,与 jQuery 3 更加一致
• input[type=radio] 开始使用严格比较 (===) 来确定“已选中”状况
• 改进的 input[type=range] 支持使范围输入的行为发生变更 (绑定到 ngModel 时)
• ngTransclude 开始将仅空格内容视为空白,并改为使用回退内容
• ngAria/ngModel 不再覆盖自定义 checkbox-shaped 控件的默认 $inEmpty() 方法
• $http 的 success() 和 error() 方法已弃用
|
|
|
• $resource 支持 request 和 requestError 拦截器
• 移除了以下已弃用的功能:
◦ $controllerProvider.allowGlobals() 标志
◦ $compileProvider.preAssignBindingsEnabled() 标志
◦ angular.lowercase 和 angular.uppercase 方法
◦ ngCookies 模块中的 $cookieStore 服务
◦ ngClick 覆盖 ngTouch 模块中的指令和相应服务
◦ 完整 ngScenario 模块
|
|
|
• 1.8 是解决 1.7 中安全问题的重大变更
• 当不在 XHTML 模式下时,jqLite 不再将类似 XHTML 的字符串转换为同级元素
|