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

753
Views
Error GET http://localhost:4200/styles.css pero puedo usar estos estilos. ¿Cual es el trato?

Recibo un error en mi proyecto angular 2 donde en la consola de herramientas de desarrollo de Chrome hay un mensaje que dice OBTENER http://localhost:4200/styles.css con una x roja a la izquierda. Sin embargo, puedo usar estos estilos, ¿cuál es el trato?

Este es mi archivo index.html:

 <!doctype html> <html> <head> <meta charset="utf-8"> <title>Scorekeeper</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script> <link rel="stylesheet" href="./styles.css"> </head> <body> <app-root>Loading...</app-root> </body> </html>

ingrese la descripción de la imagen aquí

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Elimine ese enlace a su hoja de estilo de su index.html. Está utilizando angular-cli y en su configuración, angular-cli incluye styles.css. Su etiqueta de enlace en el HTML no está haciendo nada.

(El cli angular también está inyectando dinámicamente una etiqueta de enlace para ese estilo en su html, por lo que 'funciona').

over 4 years ago · Santiago Trujillo Report

0

Elimine la ruta de su hoja de estilo de index.html y vincúlela a través de angular-cli.json como este estilo:

 [ "styles.css", "css/style.css", "css-link/bootstrap.css" ]
over 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!