Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用angular替换文件无效_Angular_Typescript_Ionic Framework_Angular9_Ionic5 - Fatal编程技术网

使用angular替换文件无效

使用angular替换文件无效,angular,typescript,ionic-framework,angular9,ionic5,Angular,Typescript,Ionic Framework,Angular9,Ionic5,我不熟悉ionic,在我的ionic应用程序中,我需要根据环境(dev/prod)切换组件的HTML和ts文件 因此,我使用的是来自角度的文件替换选项 "fileReplacements": [ { "replace": "src/app/vital-entry/vital-entry.page.html", "with":

我不熟悉ionic,在我的ionic应用程序中,我需要根据环境(dev/prod)切换组件的HTML和ts文件

因此,我使用的是来自角度的文件替换选项

 "fileReplacements": [
              {
                "replace": "src/app/vital-entry/vital-entry.page.html",
                "with": "src/app/vital-entry/vital-entry-stJohns.page.html"
              },
              {
                "replace": "src/app/health-condition-entry/health-condition-entry.page.html",
                "with": "src/app/health-condition-entry/health-condition-entry-stJohns.page.html"
              },
              {
                "replace": "src/app/health-condition-entry/health-condition-entry.page.ts",
                "with": "src/app/health-condition-entry/health-condition-entry-stJohns.page.ts"
              },
              {
                "replace": "src/app/submitting-conditions/submitting-conditions.page.ts",
                "with": "src/app/submitting-conditions/submitting-conditions-stJohns.page.ts"
              }
            ]
          },
但是,当附加文件(如提交条件stJohns.page.ts、健康条件条目stJohns.page.ts、健康条件条目stJohns.page.html、重要条目stJohns.page.html)添加到组件中时,我在生产模式中遇到了一个奇怪的问题,开发模式在组件中运行良好

ERROR in src/app/health-condition-entry/health-condition-entry-stJohns.page.html:1:1 - error NG8001: 'ion-header' is not a known element:
1. If 'ion-header' is an Angular component, then verify that it is part of this module.
2. If 'ion-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

1 <ion-header>
  ~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:2:3 - error NG8001: '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.

2   <ion-toolbar>
    ~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:3:5 - error NG8001: 'ion-buttons' is not a known element:      
1. If 'ion-buttons' is an Angular component, then verify that it is part of this module.
2. If 'ion-buttons' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this 
message.

3     <ion-buttons slot="start">
      ~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:4:7 - error NG8001: 'ion-menu-button' is not a known element:
1. If 'ion-menu-button' is an Angular component, then verify that it is part of this module.
2. If 'ion-menu-button' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

4       <ion-menu-button></ion-menu-button>
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:6:5 - error NG8001: '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.

6     <ion-title> Health Condition Entry </ion-title>
      ~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:10:1 - error NG8001: 'ion-content' is not a known element:
1. If 'ion-content' is an Angular component, then verify that it is part of this module.
2. If 'ion-content' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this 
message.

10 <ion-content id="page15">
   ~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:12:5 - error NG8001: 'ion-row' is not a known element:
1. If 'ion-row' is an Angular component, then verify that it is part of this module.
2. If 'ion-row' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

12     <ion-row class="ubiqrow" style="font-size: 1.5em">
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.htmlm:13:7 - error NG8001: 'ion-col' is not a known element:        
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

13       <ion-col>
         ~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:14:9 - error NG8001: 'ion-label' is not a known element:
1. If 'ion-label' is an Angular component, then verify that it is part of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

14         <ion-label></ion-label>
           ~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:16:7 - error NG8001: 'ion-col' is not a known element:
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

16       <ion-col>
         ~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:17:9 - error NG8001: 'ion-label' is not a known element:
1. If 'ion-label' is an Angular component, then verify that it is part of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

17         <ion-label></ion-label>
           ~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:19:7 - error NG8001: 'ion-col' is not a known element:
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

19       <ion-col>
         ~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:20:9 - error NG8001: 'ion-label' is not a known element:       
1. If 'ion-label' is an Angular component, then verify that it is part of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

20         <ion-label></ion-label>
           ~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:22:7 - error NG8001: 'ion-col' is not a known element:
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

22       <ion-col>
         ~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:23:9 - error NG8001: 'ion-label' is not a known element:
1. If 'ion-label' is an Angular component, then verify that it is part of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

23         <ion-label></ion-label>
           ~~~~~~~~~~~~~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:25:7 - error NG8001: 'ion-col' is not a known element:
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

25       <ion-col>
         ~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:26:9 - error NG8001: 'ion-label' is not a known element:
1. If 'ion-label' is an Angular component, then verify that it is part of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

26         <ion-label>Mild</ion-label>
           ~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
      m                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:28:7 - error NG8001: 'ion-col' is not a known element:
1. If 'ion-col' is an Angular component, then verify that it is part of this module.
2. If 'ion-col' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

28       <ion-col>
         ~~~~~~~~~
 <ion-col>
         ~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component HealthConditionEntryPage.
src/app/health-condition-entry/health-condition-entry-stJohns.page.html:29:9 - error NG8001: 'ion-label' is not a known element:
1. If 'ion-label' is an Angular component, then verify that it is part of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

29         <ion-label>Moderate</ion-label>
           ~~~~~~~~~~~

  src/app/health-condition-entry/health-condition-entry-stJohns.page.ts:15:16
    15   templateUrl: 'health-condition-entry-stJohns.page.html',
src/app/health condition entry/health condition entry stJohns.page.html:1:1中出现错误-错误NG8001:“离子头”不是已知元素: 1.如果“离子头”是一个角度组件,则确认它是该模块的一部分。 2.如果“ion header”是Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。 1. ~~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.html:2:3-错误NG8001:“离子工具栏”不是已知元素: 1.如果“离子工具栏”是一个角度组件,则验证它是否是此模块的一部分。 2.如果“ion toolbar”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”中以抑制此操作 消息 2. ~~~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.html:3:5-错误NG8001:“离子按钮”不是已知元素: 1.如果“离子按钮”是一个角度组件,则确认它是该模块的一部分。 2.如果“ion buttons”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此操作 消息 3. ~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.html:4:7-错误NG8001:“离子菜单按钮”不是已知元素: 1.如果“离子菜单按钮”是一个角度组件,则确认它是该模块的一部分。 2.如果“ion menu button”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。 4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.html:6:5-错误NG8001:“离子标题”不是已知元素: 1.如果“ion title”是一个角度组件,则验证它是否是该模块的一部分。 2.如果“ion title”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。 6健康状况条目 ~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.html:10:1-错误NG8001:“离子内容”不是已知元素: 1.如果“离子含量”是一个角度分量,则确认它是该模块的一部分。 2.如果“ion content”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”中以抑制此操作 消息 10 ~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.html:12:5-错误NG8001:“离子行”不是已知元素: 1.如果“离子行”是一个角度组件,则确认它是该模块的一部分。 2.如果“ion row”是Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。 12 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 组件HealthConditionEntryPage的模板中出错。 src/app/health condition entry/health condition entry stJohns.page.htmlm:13:7-错误NG8001:“离子柱”不是已知元素: 1.如果“ion col”是一个角度组件,则确认它是该模块的一部分。 2.如果“ion col”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。 13 ~~~~~~~~~ src/app/health condition entry/health condition entry stJohns.第页ts:15:16 15 templateUrl:“健康状况条目stJohns.page.html”, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 错误发生在