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
¿Cuál es el punto de partida en Angular 2 antes de llamar a AppComponent.ts?

Quiero hacer algo en el punto de inicio de la aplicación angular 2, pero no puedo obtener ese punto. Amablemente me ayude si alguien sabe acerca de esto.

Gracias por adelantado.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Index.html es el inicio y continúa main.ts y luego va con <my-app> y sigue y sigue

Después de Index.html, se carga systemjs.config.js . Lo que indica qué archivo ejecutar. Y en systemjs.config.js , le dice que cargue main.ts para comenzar.

los paquetes le dicen al cargador del sistema cómo cargar cuando no hay nombre de archivo y/o extensión

Después de investigar un poco, mire el siguiente archivo systemjs.config.js . Los comentarios dicen qué hace y cuándo.

 /** * System configuration for Angular samples * Adjust as necessary for your application needs. */ (function (global) { System.config({ paths: { // paths serve as alias 'npm:': 'node_modules/' }, // map tells the System loader where to look for things map: { // our app is within the app folder app: 'app', // angular bundles '@angular/core': 'npm:@angular/core/bundles/core.umd.js', '@angular/common': 'npm:@angular/common/bundles/common.umd.js', '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js', '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js', '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', '@angular/http': 'npm:@angular/http/bundles/http.umd.js', '@angular/router': 'npm:@angular/router/bundles/router.umd.js', '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js', '@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js', // other libraries 'rxjs': 'npm:rxjs', 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', //For android Internet 'moment': 'npm:moment', 'jquery':'npm:jquery/dist/jquery.js', 'fullcalendar':'npm:fullcalendar/dist/fullcalendar.js' }, // packages tells the System loader how to load when no filename and/or no extension packages: { app: { main: './main.js', defaultExtension: 'js' }, rxjs: { defaultExtension: 'js' }, moment: { main: './moment.js', defaultExtension: 'js' } } }); })(this);
about 4 years ago · Santiago Trujillo Report

0

APP_INITIALIZER es tu amigo.

Le permite ejecutar un fragmento de código, esperar a que se complete y luego continuar cargando su aplicación angular.

Verifique cómo implementar: Angular: Cómo implementar correctamente APP_INITIALIZER

about 4 years ago · Santiago Trujillo Report
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!