CRUD para MySQL usando Angular y PHP
-
Crear la base de datos usando el archivo pruebas_db.sql
-
Los archivos PHP los pones dentro de una carpeta llamada api en el directorio de tu servidor
-
Crea un nuevo proyecto de angular abriendo una terminal y escribe la siguiente linea:
ng new NombreProyecto
-
Abre un editor de texto para esto yo recomiendo Visual Studio Code
-
Abre el proyecto en VSCode y muestra la terminal interna
view->terminal
- Ejecuta la siguiente linea en la terminal interna para poder visualizar el proyecto en el navegador
ng serve
En el navegador entra a http://localhost:4200
- En la terminal interna ejecuta la siguiente linea para crear un servicio para el proyecto
ng g s Nombre_del_Servicio
ó
ng generate service Nombre_del_Servicio
puedes usar el archivo usuarios.service.ts como referencia
-
Importa los modulos necesarios en app.module.ts
-
Crea el comportamiento de la aplicacion en app.component.ts
-
Modifica como mostrar la informacion en app.component.html
Guarda todos los cambios y visuliza el navegador