removeView was not found


#1

Hello i am getting this error: Uncaught in promise: removeView was not found

this is my app.compontent where the problem lies… See any error? Thanks

               import { Component, ViewChild } from '@angular/core';
          import { StatusBar, Splashscreen } from 'ionic-native';

          import { Platform, Nav, App, MenuController } from 'ionic-angular';
          import { SplashScreen } from '@ionic-native/splash-screen';

          import { TabsPage } from '../pages/tabs/tabs';

          import { SplitPane } from '../providers/split-pane';

          import { AuthService } from "../providers/auth-service";

          import { Common } from "../providers/common";
          import { SettingsPage } from '../pages/settings/settings';
          import { AccountPage } from '../pages/account/account';
          import { HomePage } from '../pages/home/home';
          import { Http, Headers } from '@angular/http';




          @Component({
              selector: "page-app", templateUrl: "app.html" 
          })
          export class MyApp {
              @ViewChild(Nav) nav: Nav;

              rootPage = TabsPage;

              pages: Array<{ title: string, component: any }>;

              data: any = {};
              public userDetails: any;
              public resposeData: any;
              public dataSet: any;
              public groupSet: any;
              public pressSet: any;
              userPostData = {
                  uid: "",
                  token: "",
                  username: "",
                  bio: "",
                  profile_pic: ""
              };

              constructor(
                  public common: Common,
                  public platform: Platform,
                  splashScreen: SplashScreen,
                  public app: App,
                  public splitPane: SplitPane,
                  public menu: MenuController,
                  public http: Http,
                  public authService: AuthService
              )
              {
                  this.initializeApp();

                  // used for an example of ngFor and navigation
                  this.pages = [
                      { title: 'Homepage', component: HomePage },
                      { title: 'Settings', component: SettingsPage },
                      { title: 'Account', component: AccountPage }
                  ];

                  const data = JSON.parse(localStorage.getItem("userData"));
                  this.userDetails = data.userData;
                  this.userPostData.uid = this.userDetails.uid;
                  this.userPostData.token = this.userDetails.token;
                  this.userPostData.username = this.userDetails.username;
                  this.userPostData.profile_pic = this.userDetails.profile_pic;
                  this.userPostData.bio = this.userDetails.bio;
                  this.userDetail();

              }

              ionViewDidLoad() {
                  console.log('ionViewDidLoad HomeMenuPage');
              }

              userDetail() {
                  this.common.presentLoading();
                  this.authService.postData(this.userPostData, "userDetails").then(

                      result => {
                          this.resposeData = result;
                          if (this.resposeData.userDetails) {
                              this.common.closeLoading();
                              this.dataSet = this.resposeData.userDetails;
                              console.log(this.dataSet);

                          } else {
                              console.log("No access");
                          }
                      },
                      err => {
                          //Connection failed message
                      }
                  );
              }


              SettingsPage() {
                  // Reset the content nav to have just this page
                  // we wouldn't want the back button to show in this scenario
                  this.nav.setRoot(SettingsPage);
              }

              AccountPage() {
                  // Reset the content nav to have just this page
                  // we wouldn't want the back button to show in this scenario
                  this.nav.setRoot(AccountPage);
              }

              initializeApp() {
                  this.platform.ready().then(() => {
                      // Okay, so the platform is ready and our plugins are available.
                      // Here you can do any higher level native things you might need.
                      StatusBar.styleDefault();
                      Splashscreen.hide();
                  });
              }

              backToWelcome() {
                  const root = this.app.getRootNav();
                  root.popToRoot();
              }

              logout() {
                  //Api Token Logout 

                  localStorage.clear();
                  this.menu.enable(false);
                  setTimeout(() => this.backToWelcome(), 1000);

              }

          }