Intro to AngularJS
- Introduction to AngularJS
- Show basic examples
What is AngularJS
Models - represent domain-specific knowledge and data in an application
Views - the UI in an application (eg. your markup and templates). They should know the existence of your model in order to observe them, but not communicate with them
Controllers - handle inputs (clicks, user actions etc) in an applications. Based on the input, the controller updates the state of a model, but does not communicate this directly to the View. The View observes the model for any updates.
All of this helps in separating concerns within our web application
Angular is built around the belief that declarative code is better than imperative code when it comes to building UIs and writing software components together, while imperative code is excellent for business logic
The Zen of Angular
- Built-in HTML Template Engine
Declarative, uses view to derive behavior
2-way data binding (The model and the view are in sync)
Built in filters to query over datasets
Model change listeners
Support for REST
jQuery built in
Great Debugger - Batarang
- Testing - Unit testing and E2E Testing
One of the best features of Angular is the ability to create directives.
Directives are reusable web components
Basically, Angular gives you the ability to create domain-specific HTML tags that can be used anywhere within the application or across applications (depending on the design)
Maybe Angular Directives and Testing can be a Talk for CLE-JS!
By Anurag Saxena