Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Coding

Erik Aschenbrenner ashburnere

🤓
Coding
View GitHub Profile
View javascript-learning-online.txt
https://jaxenter.com/javascript-teach-yourself-157072.html
https://developer.mozilla.org/en-US/docs/Learn/JavaScript
https://www.theodinproject.com/courses/javascript
https://www.freecodecamp.org/
https://www.codewars.com
View ng-basics-components.md

Components

Components define areas of responsibility in your UI that let you reuse these sets of UI functionality.

A component is comprised of three things:

  • A component class, which handles data and functionality. In the previous section, the product data and the share() method were defined for you in the component class.
  • An HTML template, which determines what is presented to the user. In the previous section, you modified the product list's HTML template to display the name, description, and a "Share" button for each product.
  • Component-specific styles that define the look and feel. The product list does not define any styles.

An Angular application is composed of a tree of components, in which each Angular component has a specific purpose and responsibility.

View ng-basics-template_syntax.md

Template syntax

Angular's template syntax extends HTML and JavaScript.

Structural directives

Structural directives shape or reshape the DOM's structure, typically by adding, removing, and manipulating the elements to which they are attached. Any directive with an * is a structural directive.

*ngFor A structural directive that renders a template for each item in a collection.

<div *ngFor="let product of products">
</div>
View gist:f22bf6a8c40097f3695876b0cfd4f3cd
https://reqres.in/
http://jsonplaceholder.typicode.com/
https://developer.github.com/v3/
View gist:9927c256a505fbed3251
  • Pick the flowers
  • Call John 9303032332
  • Cancel cable subscription
  • Book the flight tickets