<a href='https://github.com/angular/angular.js/edit/v1.6.x/docs/content/guide/migration.ngdoc?message=docs(guide%2FMigrating from Previous Versions)%3A%20describe%20your%20change...' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a>
<h1 id="migrating-an-app-to-a-newer-version">Migrating an App to a newer version</h1>
<p>Minor version releases in AngularJS introduce several breaking changes that may require changes to your
application's source code; for instance from 1.0 to 1.2 and from 1.2 to 1.3.</p>
<p>Although we try to avoid breaking changes, there are some cases where it is unavoidable:</p>
<ul>
<li>AngularJS has undergone thorough security reviews to make applications safer by default,
which drives many of these changes.</li>
<li>Several new features, especially animations, would not be possible without a few changes.</li>
<li>Finally, some outstanding bugs were best fixed by changing an existing API.</li>
</ul>
<h2 id="contents">Contents</h2>
<ul class="nav nav-list">
<li><a href="guide/migration#migrating-from-1-5-to-1-6">Migrating from 1.5 to 1.6</a></li>
<li><a href="guide/migration#migrating-from-1-4-to-1-5">Migrating from 1.4 to 1.5</a></li>
<li><a href="guide/migration#migrating-from-1-3-to-1-4">Migrating from 1.3 to 1.4</a></li>
<li><a href="guide/migration#migrating-from-1-2-to-1-3">Migrating from 1.2 to 1.3</a></li>
<li><a href="guide/migration#migrating-from-1-0-to-1-2">Migrating from 1.0 to 1.2</a></li>
</ul>
<h2 id="migrating-from-1-5-to-1-6">Migrating from 1.5 to 1.6</h2>
<p>Angular 1.6 fixes numerous bugs and adds new features, both in core and in external modules.
In addition, it includes several security and performance improvements in commonly used services,
such as <code>$compile</code>, <code>$injector</code>, <code>$parse</code>, <code>$animate</code>, and directives, such as <code>input</code>, <code>ngModel</code>
and <code>select</code>.</p>
<p>The most notable changes are:</p>
<ul>
<li>Aligning jqLite with the latest version of jQuery (3.x).</li>
<li>Implementing long awaited features, such as support for inputs of type <code>range</code> and the ability to
bind to any type of values using <code>ngRepeat</code> with <code>select</code>.</li>
<li>Disabling (by default) the pre-assignment of bindings on controller instances, which helps with
support for native ES6 classes.</li>
<li>Changing the default <code>$location</code> hash-prefix to <code>'!'</code>, as the previous empty string default was
unconventional and confusing.</li>
<li>Reporting possibly unhandled promise rejections that would otherwise go unnoticed.</li>
</ul>
<p>Another major change is the removal of the <strong>Expression Sandbox</strong>. This should not require changes
to your application (and may give it a small performance boost), but we strongly recommend reading
the <a href="http://angularjs.blogspot.com/2016/09/angular-16-expression-sandbox-removal.html">Sandbox Removal Blog Post</a>
to understand the implications behind the removal and whether any action is required on your part.</p>
<p><br />
You may also notice that this release comes with a longer-than-usual list of breaking changes. Don't
let this dishearten you though, since most of them are pretty minor - often not expected to affect
real applications. These breaking changes were necessary in order to:</p>
<ul>
<li>Align with breaking changes in jQuery 3.</li>
<li>Fix bugs that we wouldn't be able to fix otherwise.</li>
<li>Introduce new features, performance improvements and security fixes.</li>
<li>Make the behavior of existing features more consistent and predictable.</li>
</ul>
<p><br />
To give you a heads-up, here is a brief summary of the breaking changes that are expected to have
the highest impact. Make sure you look them up in the full list below or check out the corresponding
commits for more info.</p>
<ul>
<li><p><strong>$location</strong> now uses <code>'!'</code> as the default hash-prefix for hash-bang URLs, instead of the empty
string. (<a href="guide/migration#commit-aa077e8">Details</a>)</p>
</li>
<li><p><strong>$compile</strong> will (by default) not pre-assign bindings on controller instances.
(<a href="guide/migration#commit-bcd0d4">Details</a>)</p>
</li>
<li><p><strong>http</strong> imposes additional restrictions to <strong>JSONP</strong> requests for security reasons
(see <a href="guide/migration#migrate1.5to1.6-ng-services-$http">details</a> below):</p>
<ul>
<li>The request URL now needs to be trusted as a resource URL.</li>
<li>You can no longer use the <code>JSON_CALLBACK</code> placeholder for specifying the query parameter for the
callback.</li>
</ul>
</li>
</ul>
<ul>
<li><strong>jqLite</strong> is more aligned to jQuery 3, which required the following changes
(see <a href="guide/migration#migrate1.5to1.6-ng-misc-jqLite">details</a> below):<ul>
<li>Keys passed to <code>.data()</code> and <code>.css()</code> are now camelCased in the same way as the jQuery methods
do.</li>
<li>Getting/setting boolean attributes no longer takes the corresponding properties into account.</li>
<li>Setting boolean attributes to empty string no longer removes the attribute.</li>
<li>Calling <code>.val()</code> on a multiple select will always return an array, even if no option is
selected.</li>
</ul>
</li>
</ul>
<ul>
<li><p><strong>input[type=radio]</strong> now uses strict comparison (<code>===</code>) to determine its "checked" status.
(<a href="guide/migration#commit-5ac7da">Details</a>)</p>
</li>
<li><p>The improved support for <strong>input[type=range]</strong> means that the behaviour of range inputs (when
bound to <code>ngModel</code>) has changed. (<a href="guide/migration#commit-913016">Details</a>)</p>
</li>
<li><p><strong>ngTransclude</strong> now treats whitespace-only transclusion content as empty and uses the fallback
content instead. (<a href="guide/migration#commit-32aa7e">Details</a>)</p>
</li>
<li><p><strong>ngAria/ngModel</strong> no longer overrides the default <code>$inEmpty()</code> method for custom
<code>checkbox</code>-shaped controls. (<a href="guide/migration#commit-975a61">Details</a>)</p>
</li>
</ul>
<p><br />
Below is the full list of breaking changes:</p>
<ul>
<li>Core:<ul>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives">Directives</a><ul>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-form">form</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-input[number]">input[number]</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-input[radio]">input[radio]</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-input[range]">input[range]</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-ngBind">ngBind</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-ngModel">ngModel</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-ngModelOptions">ngModelOptions</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-ngTransclude">ngTransclude</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-directives-select">select</a></li>
</ul>
</li>
<li><a href="guide/migration#migrate1.5to1.6-ng-services">Services</a><ul>
<li><a href="guide/migration#migrate1.5to1.6-ng-services-$compile">$compile</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-services-$http">$http</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-services-$interpolate">$interpolate</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-services-$location">$location</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-services-$q">$q</a></li>
</ul>
</li>
<li><a href="guide/migration#migrate1.5to1.6-ng-misc">Miscellaneous</a><ul>
<li><a href="guide/migration#migrate1.5to1.6-ng-misc-jqLite">jqLite</a></li>
<li><a href="guide/migration#migrate1.5to1.6-ng-misc-decorator">decorator()</a></li>
</ul>
</li>
</ul>
</li>
<li>Modules:<ul>
<li><a href="guide
没有合适的资源?快使用搜索试试~ 我知道了~
angular-1.6.4
共2000个文件
html:1251个
js:1211个
json:197个
需积分: 9 0 下载量 150 浏览量
2017-06-11
22:01:59
上传
评论
收藏 10.53MB ZIP 举报
温馨提示
Angular-1.6.4,希望大家能用的上
资源详情
资源评论
资源推荐
收起资源包目录
angular-1.6.4 (2000个子文件)
bootstrap.css 118KB
bootstrap.min.css 98KB
docs.css 16KB
bootstrap-theme.css 15KB
bootstrap-theme.min.css 13KB
open-sans.css 5KB
angular-topnav.css 4KB
doxy.css 3KB
doc_widgets.css 3KB
sunburst.css 2KB
desert.css 2KB
prettify.css 2KB
prettify.css 2KB
sons-of-obsidian.css 1KB
prettify-theme.css 1KB
styles.css 1KB
animations.css 684B
prettify.min.css 675B
animations.css 599B
animations.css 591B
animations.css 589B
animations.css 569B
animations.css 540B
animations.css 540B
animations.css 492B
animations.css 458B
style.css 393B
style.css 393B
style.css 379B
animations.css 343B
angular-csp.css 343B
style.css 303B
style.css 299B
style.css 281B
style.css 268B
style.css 236B
animations.css 224B
animations.css 224B
style.css 196B
animations.css 179B
style.css 137B
style.css 136B
style.css 125B
style.css 103B
style.css 98B
style.css 74B
app.css 60B
style.css 47B
style.css 47B
style.css 27B
style.css 24B
animations.css 0B
migration.html 148KB
ng.html 58KB
$compile.html 58KB
$httpBackend.html 52KB
directive.html 51KB
component-router.html 47KB
$sce.html 44KB
$http.html 41KB
$location.html 41KB
$rootScope.Scope.html 36KB
ngAnimate.html 34KB
ngModel.NgModelController.html 33KB
$animate.html 30KB
orderBy.html 29KB
forms.html 28KB
$httpBackend.html 27KB
scope.html 26KB
component.html 25KB
i18n.html 24KB
compiler.html 23KB
concepts.html 23KB
unit-testing.html 22KB
step_14.html 22KB
$resource.html 21KB
animations.html 21KB
accessibility.html 21KB
decorators.html 20KB
directive.html 20KB
$q.html 20KB
faq.html 19KB
$compileProvider.html 19KB
$provide.html 19KB
expression.html 19KB
ngRepeat.html 19KB
select.html 19KB
step_09.html 18KB
providers.html 18KB
ngOptions.html 18KB
$location.html 18KB
controller.html 17KB
angular.Module.html 17KB
ngMessages.html 16KB
$route.html 15KB
ngModelOptions.html 15KB
tutorial.html 15KB
step_02.html 14KB
$animateCss.html 14KB
inprog.html 14KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
qq_26397129
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0