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

Method removeView

core/src/components/nav/nav.tsx:980–992  ·  view source on GitHub ↗

* Removes a view from the stack. * * @param view The view to remove.

(view: ViewController)

Source from the content-addressed store, hash-verified

978 * @param view The view to remove.
979 */
980 private removeView(view: ViewController) {
981 assert(
982 view.state === VIEW_STATE_ATTACHED || view.state === VIEW_STATE_DESTROYED,
983 'view state should be loaded or destroyed'
984 );
985
986 const views = this.views;
987 const index = views.indexOf(view);
988 assert(index > -1, 'view must be part of the stack');
989 if (index >= 0) {
990 views.splice(index, 1);
991 }
992 }
993
994 private destroyView(view: ViewController) {
995 view._destroy();

Callers 2

destroyViewMethod · 0.95
constructorMethod · 0.80

Calls 1

assertFunction · 0.90

Tested by

no test coverage detected