ionic-team / ionic-team/ionic-framework
bug: Ionic Angular routerDirection not being reset to "auto"
- Ngôn ngữ chính
- TypeScript
- Star
- 52.7k
- Fork
- 13.3k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 51
Mô tả
# Bug Report
**Ionic version:**
[x] **5.0.7**
**Current behavior:**
Navigation to same route twice using `[routerLink]` with `routerDirection="root"` does not reload component (expected), but leaves changed `direction=root`.
**Expected behavior:**
When navigation was dismissed (not consumed by NavController) `direction` should be set back to `auto` (or not modified at all) as if it would be after the transition finished.
**Steps to reproduce:**
1. https://github.com/kamilchlebek/ionic-router-issue
2. `ionic serve`
3. Tap `go to sub page`
4. You'll see expected back button
5. Tap back button
6. Open side menu - tap "Page" (which links to already opened page)
7. Tap `go to sub page`
8. :x: there's no back button
**Other information:**
Same thing happens while using angular v9
Of course I know that I can update `direction` manually before using `router.navigate` but it took me a while to figure it out.
**Ionic info:**
```
Ionic:
Ionic CLI : 6.6.0
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0
Utility:
cordova-res : not installed
native-run : 1.0.0
System:
NodeJS : v12.16.1
npm : 6.13.4
OS : Linux 4.15
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with the linked reproduction repository and run `ionic serve`, then follow the `[routerLink]` navigation using `routerDirection="root"` in the Ionic Angular router handling. Reproduce the side-menu navigation to an already-open page and confirm that a later sub-page navigation restores the expected back button by resetting the direction to `auto` when navigation is dismissed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100