Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda