@@ -20,9 +20,9 @@ which drives many of these changes.
20
20
# Migrate from 1.4 to 1.5
21
21
22
22
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.
26
26
27
27
28
28
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:
38
38
style of architecture).
39
39
* Multi-slot transclusion: Enabling the design of more powerful and complex UI elements with a much
40
40
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.
41
44
* `ngAnimateSwap`: A new directive in `ngAnimate`, making it super easy to create rotating
42
- banner-like components
45
+ banner-like components.
43
46
* Testing helpers: New helper functions in `ngMock`, simplifying testing for animations, component
44
47
controllers and routing.
45
48
@@ -160,6 +163,42 @@ always assumed to be of type 'string', so passing non-string values never worked
160
163
The main difference is that now it will fail faster and with a more informative error message.
161
164
162
165
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
+
163
202
164
203
165
204
0 commit comments