Xerlith / training-ng7-directives

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EXERCISE CONTENT

This is an example version of a simple app for JS/Angular training, Angular part.

Steps:

  1. Set up a project using Angular CLI
  2. Fill the main component with dummy data
  3. Fetch images using this endpoint: https://jsonplaceholder.typicode.com/albums/1/photos?_limit=10
  4. Create a responsive image grid
  5. Create a directive for lazy loading images asynchronously
  6. Plug the directive into the image grid
  7. (Optional) Write unit tests
  8. Actually, it's not optional. Test your code. Especially JavaScript.

Notes:

Use TypeScript typings (TSLint not mandatory here)
Use services for component-nonspecific behaviours
Use Observables
Make the directive as universal as possible

ORIGINAL INFORMATION

Project

This project was generated with Angular CLI version 7.3.8.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

About


Languages

Language:TypeScript 55.2%Language:HTML 17.2%Language:SCSS 15.5%Language:JavaScript 12.1%