A sample signup and login form using Angular 2. This project is like my "Hello World" in Angular 2.
Here, I have used concepts like dependency injection (for using Service), routing etc.
Things I have missed are: form validation.
We have 4 key players in an Angular 2 app:
- Components
- Directives
- Routers
- Services
The Component encapsulates the template, data and the behavior of the view. We don’t need to access the DOM to change a the value of a tag. In angular, we do it by data binding. If we need to talk to the backend server to fetch the data and if this process is no where related to the Component, we do it by using Services. A Directive is a class that allows us to extend or control DOM. We can create custom tags or attributes. Routers help in directing users to different pages based on the option they choose on the main page.
# - variable declaration
() - event binding
[] - property binding
[()] - two-way property binding
{{ }} - interpolation
* - structural directives