mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
refactor(all): enable strictPropertyInitialization
This commit is contained in:
@ -7,16 +7,15 @@ import { NavComponent } from '../nav/nav-util';
|
||||
})
|
||||
export class NavSetRoot {
|
||||
|
||||
@Element() el: HTMLElement;
|
||||
@Prop() component: NavComponent;
|
||||
@Prop() componentProps: ComponentProps;
|
||||
@Prop() url: string;
|
||||
@Element() el!: HTMLElement;
|
||||
@Prop() component?: NavComponent;
|
||||
@Prop() componentProps?: ComponentProps;
|
||||
|
||||
@Listen('child:click')
|
||||
push(): Promise<any> {
|
||||
const nav = this.el.closest('ion-nav');
|
||||
if (nav) {
|
||||
const toPush = this.url || this.component;
|
||||
const toPush = this.component;
|
||||
if (nav && toPush) {
|
||||
return nav.setRoot(toPush, this.componentProps);
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
|
||||
@ -17,11 +17,6 @@ string
|
||||
|
||||
|
||||
|
||||
#### url
|
||||
|
||||
string
|
||||
|
||||
|
||||
## Attributes
|
||||
|
||||
#### component
|
||||
@ -34,11 +29,6 @@ string
|
||||
|
||||
|
||||
|
||||
#### url
|
||||
|
||||
string
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user