- Working with Angular might be a little different than what you're used to. One of the popular ways of organizing modern applications uses something called an MVC Architecture. In order to understand how AngularJS works, we need to talk about MVC and how it relates to AngularJS. Now, the M in an MVC Architecture stands for model. Now, it's easier if you think of it as data. You're probably used to working with data from a text file, a JSON document, or a MySQL database. However, in AngularJS, as well as in other MVC frameworks, the data is referred to as the model.
Now, in order to show your data, you use something called a view. That's the V in the MVC Architecture. This is nothing more than a template. In AngularJS, you create views using regular HTML plus curly braces where you want the data to appear on your page. The curly braces hold expressions that control how your data appears on that page. Now, if you've used something like Mustache.js or another templating framework, this will be right up your alley. Now, the ability to add functionality to your Views is done through something called a controller.
Together, a series of modules will make up your entire application. Now, one more thing. Technically, Angular's way of creating applications is known as MVW or Model View Whatever because it's a bit more flexible than an MVC Architecture, but the separation of concerns is pretty similar. Trust me, working with this structure is gonna make your applications easier to work with.
- What is AngularJS?
- Working with complex models
- Using a the $http service to read a JSON file
- Binding data
- Dividing your app into partials
- Creating a details template
- Using AngularJS animation events