Angularjs Examples

AJS Examples


AngularJS ng-App Directive

The AngularJS ng-app directive is used to set the AngularJS section in HTML DOM.

Syntax

<html ng-app="">
<div ng-app="">
<div ng-app="myapp">

AngularJS ng-App Directive Example

<html ng-app>
<head>
<title>My first AngularJS ng-app Directive code</title>
<Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js">
</Script>
</head>
<body>
<p>Input string in below box:</p>
<input ng-model="myName" type="text"  placeholder="Your name">
<h1>Hey  {{  myName  }}</h1>
</body>
</html>
See Live Example