Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

173
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda