5,337
edits
No edit summary |
|||
Line 1: | Line 1: | ||
Angular is a web framework by Google which allows you to create progressive web apps (PWAs). | Angular is a web framework by Google which allows you to create progressive web apps (PWAs) which are single page applications (SPA). | ||
It can also be used to create native mobile or desktop apps. | It can also be used to create native mobile or desktop apps. | ||
Line 29: | Line 29: | ||
===Services=== | ===Services=== | ||
Services are singleton classes which can be accessed from any component. | |||
<pre> | <pre> | ||
ng generate service <name> | ng generate service <name> | ||
</pre> | </pre> | ||
To access a service from a component, add a reference to the service as a parameter to the constructor of your component. | |||
==Routing== | ==Routing== |