Skip to content

Aplicação Angular com backend Json Server para CRUD de produtos

License

Notifications You must be signed in to change notification settings

wfrsilva/AngularJson01_COD3R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJson01_COD3R

Aplicação Angular com backend Json Server para CRUD de produtos

Inspirado na playlist de aulas Angular do canal de youtube COD3RS Cursos.

Neste curso gratuito iremos desenvolver uma APLICAÇÃO COMPLETA usando o Angular 9 e ao mesmo tempo entender os principais conceitos do framework! Falaremos sobre: Componentes, Diretivas, Services, Observables, RxJS, Pipes, Injeção de Dependência e muito mais.

COD3R Cursos

Aulas youtube x aulas cod3r

Instalações primordiais

$ npm i json-server

$ snap install postman

$ npm i -g @angular/cli

Instalações auxiliares

ngrok: para conseguir exibir seu localhost na web;

  • $ sudo snap install ngrok

Grid Rule: Cria grids no navegador Chrome para facilitar medidas e alinhamentos;

Angular deploy github-pages

https://www.youtube.com/watch?v=wmskNL5xyjw

Problemas na build

´$ ng build --prod --base-href "https://wfrsilva.github.io/AngularJson01_COD3R/" An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json' See "C:\Users\Avell\AppData\Local\Temp\ng-B79Plr\angular-errors.log" for further details.`

Cannot find module '@angular-devkit - Tentando solucao:

https://stackoverflow.com/questions/50333003/could-not-find-module-angular-devkit-build-angular

$´npm install --save-dev @angular-devkit/build-angular`

Angular deploy tiiny.host

Comandos

$ sudo apt install npm

.../backend$ npm init -y

$ npm start

$ ng new frontend --minimal

  • Would you like to add Angular routing? (y/N) Y
  • > CSS
  • CSS | SCSS | Sass | Less | Stylus

$ cd frontend $ ng serve

http://localhost:4200/

$ ng add @angular/material

  • Choose a prebuilt theme name, or "custom" for a custom theme: (Use arrow keys)
  • ❯ Indigo/Pink [ Preview: https://material.angular.io?theme=indigo-pink ]
  • Set up global Angular Material typography styles? (y/N) Y
  • Set up browser animations for Angular Material? (y/N) Y

frontend$ ng generate component components/template/header

ou frontend$ ng g c components/template/header

frontend$ ng g c components/template/footer

frontend$ ng g c components/template/nav

frontend$ ng g c views/home

frontend$ ng g d directives/red

frontend$ ng g d directives/for

frontend$ ng g c components/product/product-create

frontend$ ng g s components/product/product

frontend$ ng g c components/product/product-read

frontend$ ng g @angular/material:table components/product/product-readtable video usou read2

frontend$ ng g c components/product/product-update

frontend$ ng g c components/product/product-delete

frontend$ ng g s components/template/header/header


ngrok para visualizar projeto angular local (localhost) na web:

$ ngrok http 4200 -host-header="localhost:4200"

Tentando minimizar o uso de memoria do ng serve:

$ node --max_old_space_size=2048 node_modules/@angular/cli/bin/ng serve --host 0.0.0.0

Referências Externas

About

Aplicação Angular com backend Json Server para CRUD de produtos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published