AngularJS allows you to create a relationship between the data and the rest of your code. This is called binding, and means linking a piece of data to some other code or element in a page.
- [Instructor] One of the great things about AngularJS is…that is lets you create a relationship…between the data and the rest of your code.…Now, it does this through a process called binding,…and in order to do this,…it uses something called, directives,…so let's take a look at how they work.…Now, in order to get binding to work,…we need to make sure that we first declare our application,…or the part of the code that we want…to treat as the application using the ng-app directive.…Ng-app is a type of directive in AngularJS.…
A directive is nothing more than a fancy name for a command,…and commands or directives in angularJS almost always begin…with the ng prefix, and they look just like html attributes.…Another directive is the ng-model directive,…which creates a variable in your application,…or your application scope,…and it goes inside an html form element.…The variable can then be accessed…within your scripts as well as within your template.…
In angular, this is called two-way data binding.…In order to display our data, we can use double curly braces…
In this short, practical course, Ray Villalobos uses AngularJS to build a searchable directory—a project you can use as the basis for your own employee or user directory. He explains the MVC architecture underlying AngularJS, and the differences you can expect to encounter in Angular 2. Then he shows how to control the display of DOM elements and data; use services like $http and $routeProvider; modify content with filters; add two-way data binding; and work with routes and templates. Start watching, and learn the simple way to build your own complex web application with AngularJS.
- What is AngularJS?
- Binding data
- Defining modules and controllers
- Using the $http service to read a JSON file
- Controlling app logic with conditionals and loops
- Filtering content and lists
- Deep linking