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

167
Vistas
Adding third party resources to Angular 4

In general I prefer to add third party resources in .angular-cli.json

{
  "styles"           : [
    "../bower_components/animate.css/animate.css",
    "../bower_components/chosen/chosen.css",
    "../bower_components/cropper/dist/cropper.css",
    "../bower_components/font-awesome/css/font-awesome.min.css",
    "../bower_components/nprogress/nprogress.css"
  ],
  "scripts"          : [
    "../bower_components/jquery/dist/jquery.js",
    "../bower_components/bootstrap/dist/js/bootstrap.js",
    "../bower_components/bootstrap-progressbar/bootstrap-progressbar.js",
    "../bower_components/chosen/chosen.jquery.js",
    "../bower_components/cropper/dist/cropper.js",
    "../bower_components/fastclick/lib/fastclick.js",
    "../bower_components/nprogress/nprogress.js"
  ]
}

This approach helps me use bower beside Angular 2/4 and also build process consolidates all dependencies in one package. But tons of dependencies make application init time delay. So can defining all the components like this be more of efficient than using resources in components where needed?

For instance: We use datepicker component in contacts and companies pages. Does "Importing datepicker styles from contacts.component.css and companies.component.css action" decrease the load time by sacrificing the size?

about 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