ionic 3 машинописная ошибка 'ion-footer' не известен - PullRequest
0 голосов
/ 08 июня 2018

Я закончил сборку приложения и опубликовал его на Android, и когда я перехожу на ios (я работаю на VMware), когда я запускаю обычную сборку ios, она работает, но я делаю сборку ios --prod выдает следующие ошибки:

   typescript error 
            'ion-icon' is not a known element: 1. If 'ion-icon' is an Angular component, then verify that it is part of 
            this module. 2. If 'ion-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the 
            '@NgModule.schemas' of this component to suppress this message. ("-footer class="footer-style-dark"> 
            <ion-toolbar> <ion-title (click)="openAppointment()"> [ERROR ->]<ion-icon class="home"></ion-icon> 
            <span>Book appointment</span></ion-title> </ion-toolbar> </i") 

[17:35:34]  typescript error 
            'ion-title' is not a known element: 1. If 'ion-title' is an Angular component, then verify that it is part 
            of this module. 2. If 'ion-title' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the 
            '@NgModule.schemas' of this component to suppress this message. ("<ion-footer class="footer-style-dark"> 
            <ion-toolbar> [ERROR ->]<ion-title (click)="openAppointment()"> <ion-icon class="home"></ion-icon> 
            <span>Book appointment</s") 

[17:35:34]  typescript error 
            'ion-toolbar' is not a known element: 1. If 'ion-toolbar' is an Angular component, then verify that it is 
            part of this module. 2. If 'ion-toolbar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the 
            '@NgModule.schemas' of this component to suppress this message. ("<ion-footer class="footer-style-dark"> 
            [ERROR ->]<ion-toolbar> <ion-title (click)="openAppointment()"> <ion-icon class="home"></ion-icon> <span") 

[17:35:34]  typescript error 
            'ion-footer' is not a known element: 1. If 'ion-footer' is an Angular component, then verify that it is part 
            of this module. 2. If 'ion-footer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the 
            '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]<ion-footer 
            class="footer-style-dark"> <ion-toolbar> <ion-title (click)="openAppointment()"") 

Error: The Angular AoT build failed. See the issues above
at /Users/x/Desktop/mybeauty/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55
    at step (/Users/x/Desktop/mybeauty/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
    at Object.next (/Users/x/Desktop/mybeauty/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
    at fulfilled (/Users/x/Desktop/mybeauty/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[17:35:34]  copy finished in 23.22 s 

У меня несколько страниц.Я добавил в HTML-файл после ion-content.Этот код

<ion-footer >
  <ion-toolbar color="primary">
      <ion-title  (click)="openAppointment()" text-center>  <ion-icon name="md-calendar" style="font-size: 25px;"></ion-icon> &nbsp;<span>  order now</span></ion-title>
    </ion-toolbar>
</ion-footer>

Я искал решения, я пробовал много, но у меня не получается,

  • Я пытался добавить CUSTOM_ELEMENTS_SCHEMA в app.module.ts и все page.module.ts

    Я пытался CUSTOM_ELEMENTS_SCHEMA & NO_ERRORS_SCHEMA.Я добавил его и
    импортировал.но это не сработало.Проблема в том, что я удалил нижний колонтитул со всех страниц.Но это выдает мне ту же ошибку.

  • Я пытался импортировать ionicmodule на все page.module.ts.

мой app.module.ts (я использовал ленивую загрузкуи это дает мне ту же ошибку, я удалил все pages.module.ts и импортировал все страницы в app.module.ts, как показано ниже, но ошибки все еще те же).Страницы, которые содержат нижний колонтитул, являются: ServicepagePages, Offerspage, Specialistpage.

    import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { ReactiveFormsModule} from '@angular/forms';
import {EmailComposer} from '@ionic-native/email-composer';
import { CallNumber } from '@ionic-native/call-number';



import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { AboutPage } from '../pages/about/about';
import { AppointmentPage } from '../pages/appointment/appointment';
import { ContactusPage } from '../pages/contactus/contactus';

import { OffersPage } from '../pages/offers/offers';
import { ServicepagePage } from '../pages/servicepage/servicepage';
import { SpecialistPage } from '../pages/specialist/specialist';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { AuthProvider } from '../providers/auth/auth';
import { ClientsProvider } from '../providers/clients/clients';
import { HttpClientModule } from '@angular/common/http';
import { SocialSharing } from '@ionic-native/social-sharing';
import { AppRate } from '@ionic-native/app-rate';


@NgModule({
  declarations: [
    MyApp,
    HomePage,
    AppointmentPage,
    ContactusPage,
    AboutPage,
    OffersPage,
    ServicepagePage,
    SpecialistPage









  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    HttpClientModule,
    ReactiveFormsModule,

  ],schemas:      [ CUSTOM_ELEMENTS_SCHEMA,NO_ERRORS_SCHEMA  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    AppointmentPage,
    ContactusPage,
    AboutPage,
    OffersPage,
    ServicepagePage,
    SpecialistPage



  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    AuthProvider,
    ClientsProvider,
    EmailComposer,
    CallNumber,
    SocialSharing,
    AppRate
    ]
})
export class AppModule {
   CUSTOM_ELEMENTS_SCHEMA;

}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...