Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Bootstrapping Angular CLI App with HTML script tag

I have an Angular 4 app which is using SystemJS. I want to move to using Angular CLI. The problem is, I bootstrap the application in the index.html using a script tag as follows.

<script>
    var sf = $.ServicesFramework([ModuleContext:ModuleId]);
    System.import('app/main.js')
        .then(module => module.main(sf.getModuleId(), sf.getTabId(), sf.getAntiForgeryValue())
        .catch(function (err) { console.error(err); });

</script>

Here is the relevant code from my main.ts

export function main(dnnModuleId: number, dnnTabId: number, dnnAntiForgeryToken: string) {

     let appConfig: IAppConfig = {
         DNN_MODULE_ID: dnnModuleId
         ...
      }

 platformBrowserDynamic([
     {provide: APP_CONFIG_TOKEN, useValue: appconfig
     ...
 ]).bootstrapModule(AppModule);

After an extensive search, I i was only able to find an old question related to Webpack 1 and not related to Angular CLI.

In short is it possible to do this with Angular CLI?

If so, any guidance in where to begin looking would be much appreciated.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!