|
| 1 | +<a name="3.9.0"></a> |
| 2 | +# [3.9.0](https://github.com/ionic-team/ionic/compare/v3.8.0...v3.9.0) (2017-11-08) |
| 3 | + |
| 4 | +### Upgrade Instructions |
| 5 | +`ionic-angular` 3.9.0 adds support for `@angular` 5.0.0 :tada:! It is a drop-in replacement for `ionic-angular` 3.8.x. |
| 6 | + |
| 7 | +To update, remove existing `node_modules` and any lock files, and then update `package.json` to the following deps. |
| 8 | + |
| 9 | +``` |
| 10 | +"dependencies" : { |
| 11 | + ... |
| 12 | + "@angular/common": "5.0.0", |
| 13 | + "@angular/compiler": "5.0.0", |
| 14 | + "@angular/compiler-cli": "5.0.0", |
| 15 | + "@angular/core": "5.0.0", |
| 16 | + "@angular/forms": "5.0.0", |
| 17 | + "@angular/http": "5.0.0", |
| 18 | + "@angular/platform-browser": "5.0.0", |
| 19 | + "@angular/platform-browser-dynamic": "5.0.0", |
| 20 | + "@ionic/storage": "2.1.3", |
| 21 | + "ionic-angular": "3.9.0", |
| 22 | + "rxjs": "5.5.2", |
| 23 | + "zone.js": "0.8.18" |
| 24 | + ... |
| 25 | +}, |
| 26 | +"devDependencies: { |
| 27 | + "@ionic/app-scripts": "3.1.0" |
| 28 | + "typescript" : "2.4.2" |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +If your app uses RXJS, see the instructions below to update. |
| 33 | + |
| 34 | +### RXJS 5.5.2 Updates |
| 35 | + |
| 36 | +The recent update of RXJS includes a change in how operators are applied. |
| 37 | + |
| 38 | +Traditionally, operators were applied like this: |
| 39 | + |
| 40 | +```typescript |
| 41 | +import 'rxjs/add/operator/debounceTime'; |
| 42 | +import 'rxjs/add/operator/switchMap'; |
| 43 | + |
| 44 | +export MyClass { |
| 45 | + |
| 46 | + |
| 47 | + someMethod(){ |
| 48 | + // Using Reactive Forms |
| 49 | + this.input.valueChanges |
| 50 | + .debounceTime(500) |
| 51 | + .switchMap(inputVal => this.service.get(inputVal)) |
| 52 | + .subscribe(res => console.log(res)) |
| 53 | + } |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +This approach involved modifying the Observable prototype and patching on the |
| 58 | +methods. |
| 59 | + |
| 60 | +RXJS 5.5 introduces a different way to do this that can lead to significantly |
| 61 | +smaller code bundles, lettable operators. |
| 62 | + |
| 63 | +To use lettable operators, modify the code from above to look like this: |
| 64 | + |
| 65 | +```typescript |
| 66 | +//Use Deep imports here for smallest bunlde size |
| 67 | +import { debounceTime } from 'rxjs/operators/debounceTime'; |
| 68 | +import { switch } from 'rxjs/operators/switchMap'; |
| 69 | + |
| 70 | +export MyClass { |
| 71 | + |
| 72 | + |
| 73 | + someMethod(){ |
| 74 | + // Using Reactive Forms |
| 75 | + // We use the new `.pipe` method on the observable |
| 76 | + // too apply operators now |
| 77 | + |
| 78 | + this.input.valueChanges |
| 79 | + .pipe( |
| 80 | + debounceTime(500), |
| 81 | + switchMap(inputVal => this.service.get(inputVal)) |
| 82 | + ) |
| 83 | + .subscribe(res => console.log(res)) |
| 84 | + } |
| 85 | +} |
| 86 | +``` |
| 87 | + |
| 88 | +This slight change allows only import the operators we need in our code. This will result in a smaller, faster application. This example uses Deep Imports, which allow the module we want to import to be isolated. |
| 89 | + |
| 90 | +Take a look at [this |
| 91 | +doc](https://github.com/ReactiveX/rxjs/blob/master/doc/lettable-operators.md) for more information. |
| 92 | + |
| 93 | +### Bug Fixes |
| 94 | + |
| 95 | +* **action-sheet:** move box-shadow to first group ([4f3e91b](https://github.com/ionic-team/ionic/commit/4f3e91b)) |
| 96 | +* **alert:** focus input after it is ready ([#13259](https://github.com/ionic-team/ionic/issues/13259)) ([e555eae](https://github.com/ionic-team/ionic/commit/e555eae)) |
| 97 | +* **datetime:** use spread operator to copy pickerOptions ([#13202](https://github.com/ionic-team/ionic/issues/13202)) ([2ab8385](https://github.com/ionic-team/ionic/commit/2ab8385)), closes [#11641](https://github.com/ionic-team/ionic/issues/11641) |
| 98 | +* **input:** better support for WKKeyboard ([#13106](https://github.com/ionic-team/ionic/issues/13106)) ([e7ac15f](https://github.com/ionic-team/ionic/commit/e7ac15f)) |
| 99 | +* **tabs:** no safe area padding for top tabs ([236e7f8](https://github.com/ionic-team/ionic/commit/236e7f8)) |
| 100 | +* **tap-click:** clear activated state on activable element when appropriate ([#13258](https://github.com/ionic-team/ionic/issues/13258)) ([5742540](https://github.com/ionic-team/ionic/commit/5742540)), closes [#13044](https://github.com/ionic-team/ionic/issues/13044) |
| 101 | +* **VirtualScroll:** stop from resizing while out of view ([#13143](https://github.com/ionic-team/ionic/issues/13143)) ([6978bb5](https://github.com/ionic-team/ionic/commit/6978bb5)) |
| 102 | + |
| 103 | + |
| 104 | + |
1 | 105 | <a name="3.8.0"></a> |
2 | 106 | # [3.8.0](https://github.com/ionic-team/ionic/compare/v3.7.1...v3.8.0) (2017-10-26) |
3 | 107 |
|
|
0 commit comments