Integration of angular 10 with existing PHP project

Viewed 80

I have PHP project with having AngularJs plugins. I am migrating them to angular 10. It has functions implemented at PHP project controllers which has mechanism to load script files as below.

public function getJsFiles(&$jsFiles)
{
    $jsFiles[] = "angular-plugins/dist/runtime.js";        
    $jsFiles[] = "angular-plugins/dist/polyfills.js";                
    $jsFiles[] = "angular-plugins/dist/styles.js";  
    $jsFiles[] = "angular-plugins/dist/vendor.js";                
    $jsFiles[] = "angular-plugins/dist/main.js";                  
}

So, I have create root level NG10 project & migrated few components in few modules and successfully integrated with single build files(main.js, polyfills.js, vendors.js,runtime.js, styles.js) mentioned above.

Project has functionality that when user disable that module it won't load relevant Js files on the page.

So Problem here is, to fulfil that I have generated module wise chunk files with lazy loading (e.g core-home.js, multisites.js), But when I try to integrate with PHP project, neither it's loading component on the page not giving any console errors.

Our main goal is to load project with PHP, anguarJs and angular 10 all together.

Note : Project runs on wamp server. Please check below image for folder structure & files loaded on PHP file.

project-structure

Thanks in advance.

0 Answers
Related