Advertisement
thesuhu

Angular Commands

Aug 24th, 2020 (edited)
1,591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. # install
  2. npm i @angular/cli
  3.  
  4. # update
  5. ng update
  6.  
  7. # update all
  8. ng update --all -- force
  9.  
  10. # build prod
  11. ng build  --configuration=production --build-optimizer
  12.  
  13. # generate project current directory
  14. ng new myapp --directory ./
  15.  
  16. # generate module, non default, default otomatis create folder di bawah ./app atau ./src/app
  17. ng g m modules/referensi --routing
  18.  
  19. # generate component di dalam module, hapus file component spec.ts dan scss jika tidak perlu, atau --skip-tests waktu generate
  20. ng g c modules/referensi --skip-tests
  21.  
  22. # generate service, harus menyebut sampai nama service
  23. ng g s modules/referensi/referensi
  24.  
  25. # generate interface untuk environment
  26. ng g i modules/utils/http/environment.config.interface
  27.  
  28. # generate directive
  29. ng g d directive/sort
  30.  
  31. # generate pipe
  32. ng g p pipe/filter
  33.  
  34. # generate model
  35. ng generate class hero --type=model
  36.  
  37.  
Tags: angular
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement