MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / setRoot

Method setRoot

core/src/components/nav/nav.tsx:313–320  ·  view source on GitHub ↗
(
    component: T,
    componentProps?: ComponentProps<T> | null,
    opts?: NavOptions | null,
    done?: TransitionDoneFn
  )

Source from the content-addressed store, hash-verified

311 */
312 @Method()
313 setRoot<T extends NavComponent>(
314 component: T,
315 componentProps?: ComponentProps<T> | null,
316 opts?: NavOptions | null,
317 done?: TransitionDoneFn
318 ): Promise<boolean> {
319 return this.setPages([{ component, componentProps }], opts, done);
320 }
321
322 /**
323 * Set the views of the current navigation stack and navigate to the last view.

Callers 4

rootChangedMethod · 0.95
setRouteIdMethod · 0.95
navLinkFunction · 0.45

Calls 1

setPagesMethod · 0.95

Tested by

no test coverage detected