-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(angular): update to Angular 20 #1828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
84d6b00
5b68c57
b944770
e4649a3
d5a406b
5e8fe05
3e08786
7b85d87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||
| import { Component, OnInit, ViewChild, inject } from '@angular/core'; | ||
| import { Router, RouterLink } from '@angular/router'; | ||
|
|
||
| import { addIcons } from 'ionicons'; | ||
|
|
@@ -89,6 +89,16 @@ import { ScheduleFilterPage } from '../schedule-filter/schedule-filter'; | |
| ] | ||
| }) | ||
| export class SchedulePage implements OnInit { | ||
| alertCtrl = inject(AlertController); | ||
| confService = inject(ConferenceService); | ||
| loadingCtrl = inject(LoadingController); | ||
| modalCtrl = inject(ModalController); | ||
| router = inject(Router); | ||
| routerOutlet = inject(IonRouterOutlet); | ||
| toastCtrl = inject(ToastController); | ||
| user = inject(UserService); | ||
| config = inject(Config); | ||
brandyscarney marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // Gets a reference to the list element | ||
| @ViewChild('scheduleList', { static: true }) scheduleList: IonList; | ||
|
|
||
|
|
@@ -102,17 +112,7 @@ export class SchedulePage implements OnInit { | |
| confDate: string; | ||
| showSearchbar: boolean; | ||
|
|
||
| constructor( | ||
| public alertCtrl: AlertController, | ||
| public confService: ConferenceService, | ||
| public loadingCtrl: LoadingController, | ||
| public modalCtrl: ModalController, | ||
| public router: Router, | ||
| public routerOutlet: IonRouterOutlet, | ||
| public toastCtrl: ToastController, | ||
| public user: UserService, | ||
| public config: Config | ||
| ) { | ||
| constructor() { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be using
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can move most things to ngOnInit I believe, but not icon registration. There's no Angular lifecycle hook that renders soon enough for the template to know that the icons exist, so I'll keep icon registration in constructors, unfortunately. It may be worth looking into ionicons to see if we can defer that check, but probably not as part of this upgrade. |
||
| addIcons({ | ||
| search, | ||
| options, | ||
|
|
@@ -126,7 +126,6 @@ export class SchedulePage implements OnInit { | |
|
|
||
| ngOnInit() { | ||
| this.updateSchedule(); | ||
|
|
||
| this.ios = this.config.get('mode') === 'ios'; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,13 +9,7 @@ | |
|
|
||
| <ion-content> | ||
| <div class="support-logo"> | ||
| <img | ||
| ngSrc="assets/img/appicon.svg" | ||
| alt="Ionic Logo" | ||
| width="200" | ||
| height="200" | ||
| priority | ||
| /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This image styling was conflicting with its CSS and causing a ratio conflict. In this change, I tried to make it act like the Ionic logos in its neighboring pages. |
||
| <img src="assets/img/appicon.svg" alt="Ionic Logo" /> | ||
| </div> | ||
|
|
||
| <div class="support-form"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| .support-logo { | ||
| min-height: 200px; | ||
|
|
||
| padding: 20px 0; | ||
|
|
||
| text-align: center; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.