AngularJS ng-model (Select)

AngularJS ng-model (Select): This directive syncs the value of HTML controls to the data. The directive “ng-model” enables you to tie an input value to a variable created in your app. AngularJS allows you to combine templates with different directives so that you can combine the HTML with the JavaScript for dynamic and unique displays.

This greatly extends the capabilities of HTML. Directives are divided into two parts Part 1 includes: CSS classes, added attributes, and elements that are added to HTML. The second part includes JavaScript, which extends the behavior of the HTML.

A popular feature of Angular JS is the built-in AngularJs directives that handle most of the DOM manipulation needed to sync the contents of the scope with elements in the client’s view. You can design your own custom directives to add functionality to your web application.

ng-model (Select) Example

<!DOCTYPE html>
<script src=""></script>
<div ng-app="myApp" ng-controller="exampleCtrl">
Name: <input ng-model="name">
var app = angular.module('exampleApp,[]);
app.controller('exampleCtrl', function($scope) {
$ = "eBook Reader";
<p>This is the ng-model directive.</p>

ng-model (Select) Example Output

ng-model(Select) Example Output