AngularJS directive Example on Dev Guide
HTML
<body ng-app=myApp>
<div ng-include='my-Login-Page' >
<h2>Welcome To Login Page</h2>
Name:<input type="text" Username="Username" placeholder="Username" required />
<br> <br>
<input type="password" password="password" placeholder="Password" required>
<br> <br>
<button type="submit" ng-click="direct()">Submit</button>
</div>
</body>
JavaScript
var myApp = angular.module("login", []);
myApp.directive('myLoginPage',function()
{
return{
template:'Name:{{Username}}'
};
});