Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a25ab76

Browse files
committed
docs(guide/migration): update with changes from v1.5.0-rc.2
1 parent 622c421 commit a25ab76

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

docs/content/guide/migration.ngdoc

+43-4
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ which drives many of these changes.
2020
# Migrate from 1.4 to 1.5
2121

2222
Angular 1.5 takes a big step towards preparing developers for a smoother transition to Angular 2 in
23-
the future. Architecturing your applications using components, making use of lifecycle hooks in
24-
directive controllers and relying on native ES6 features (such as classes and arrow functions) are
25-
now all possible with Angular 1.5.
23+
the future. Architecturing your applications using components, multi-slot transclusion, using
24+
lifecycle hooks in directive controllers and relying on native ES6 features (such as classes and
25+
arrow functions) are now all possible with Angular 1.5.
2626

2727

2828
This release includes numerous bug and security fixes, as well as performance improvements to core
@@ -38,8 +38,11 @@ Among them, a few stand out:
3838
style of architecture).
3939
* Multi-slot transclusion: Enabling the design of more powerful and complex UI elements with a much
4040
simpler configuration and reduced boilerplate.
41+
* `$onInit` lifecycle hook: Introducing a new lifecycle hook for directive controllers, called after
42+
all required controllers have been constructed. This enables access to required controllers from
43+
a directive's controller, without having to rely on the linking function.
4144
* `ngAnimateSwap`: A new directive in `ngAnimate`, making it super easy to create rotating
42-
banner-like components
45+
banner-like components.
4346
* Testing helpers: New helper functions in `ngMock`, simplifying testing for animations, component
4447
controllers and routing.
4548

@@ -160,6 +163,42 @@ always assumed to be of type 'string', so passing non-string values never worked
160163
The main difference is that now it will fail faster and with a more informative error message.
161164

162165

166+
## ngTouch (`ngClick`)
167+
168+
Due to [0dfc1dfe](https://github.com/angular/angular.js/commit/0dfc1dfebf26af7f951f301c4e3848ac46f05d7f),
169+
the `ngClick` override directive from the `ngTouch` module is **deprecated and disabled by default**.
170+
This means that on touch-based devices, users might now experience a 300ms delay before a click
171+
event is fired.
172+
173+
If you rely on this directive, you can still enable it using
174+
`$touchProvider.ngClickOverrideEnabled()`:
175+
176+
```js
177+
angular.module('myApp').config(function($touchProvider) {
178+
$touchProvider.ngClickOverrideEnabled(true);
179+
});
180+
```
181+
182+
Going forward, we recommend using [FastClick](https://github.com/ftlabs/fastclick) or perhaps one of
183+
the [Angular 3rd party touch-related modules](http://ngmodules.org/tags/touch) that provide similar
184+
functionality.
185+
186+
Also note that modern browsers already remove the 300ms delay under some circumstances:
187+
188+
- **Chrome and Firefox for Android** remove the 300ms delay when the well-known
189+
`<meta name="viewport" content="width=device-width">` is set.
190+
- **Internet Explorer** removes the delay, when the `touch-action` css property is set to `none` or
191+
`manipulation`.
192+
- Since **iOS 8, Safari** removes the delay on so-called "slow taps".
193+
194+
For more info on the topic, you can take a look at this
195+
[article by Telerik](http://developer.telerik.com/featured/300-ms-click-delay-ios-8/).
196+
197+
<div class="alert alert-warning">
198+
**Note:** This change does **not** affect the `ngSwipe` directive.
199+
</div>
200+
201+
163202

164203

165204

0 commit comments

Comments
 (0)