This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new 13412adf4c [ZEPPELIN-6076] Fix rendering runtime dynamic components in 
new UI (#4809)
13412adf4c is described below

commit 13412adf4c0d1480824b946064da30502934de67
Author: ChanHo Lee <chanho0...@gmail.com>
AuthorDate: Tue Sep 3 18:49:37 2024 +0900

    [ZEPPELIN-6076] Fix rendering runtime dynamic components in new UI (#4809)
    
    * Bypass decorator removing by AOT compilation
    
    * Add comment
    
    * Add license
---
 .../app/core/runtime-dynamic-module/ng-zorro-antd-module.ts |  2 +-
 ...ntime-dynamic-module.module.ts => ngmodule.decorator.ts} | 13 ++++---------
 .../runtime-dynamic-module/runtime-dynamic-module.module.ts |  2 +-
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git 
a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/ng-zorro-antd-module.ts
 
b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/ng-zorro-antd-module.ts
index 42c2d11e21..e09cf4c6a2 100644
--- 
a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/ng-zorro-antd-module.ts
+++ 
b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/ng-zorro-antd-module.ts
@@ -10,7 +10,7 @@
  * limitations under the License.
  */
 
-import { NgModule } from '@angular/core';
+import { NgModule } from './ngmodule.decorator';
 
 import { NzAffixModule } from 'ng-zorro-antd/affix';
 import { NzAlertModule } from 'ng-zorro-antd/alert';
diff --git 
a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
 
b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/ngmodule.decorator.ts
similarity index 63%
copy from 
zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
copy to 
zeppelin-web-angular/src/app/core/runtime-dynamic-module/ngmodule.decorator.ts
index 27d08f94a8..8fc8f8da88 100644
--- 
a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
+++ 
b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/ngmodule.decorator.ts
@@ -9,13 +9,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import { CommonModule } from '@angular/common';
-import { NgModule } from '@angular/core';
-import { FormsModule } from '@angular/forms';
-import { NzModule } from './ng-zorro-antd-module';
 
-@NgModule({
-  declarations: [],
-  exports: [CommonModule, FormsModule, NzModule]
-})
-export class RuntimeDynamicModuleModule {}
+// importing NgModule and Component from @angular/core
+// and re-exporting them to prevent AOT compiler from removing them
+import { Component, NgModule } from '@angular/core';
+export { NgModule, Component };
diff --git 
a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
 
b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
index 27d08f94a8..09af1c1bc9 100644
--- 
a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
+++ 
b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts
@@ -10,9 +10,9 @@
  * limitations under the License.
  */
 import { CommonModule } from '@angular/common';
-import { NgModule } from '@angular/core';
 import { FormsModule } from '@angular/forms';
 import { NzModule } from './ng-zorro-antd-module';
+import { NgModule } from './ngmodule.decorator';
 
 @NgModule({
   declarations: [],

Reply via email to