Minimal directive example

from https://groups.google.com/forum/?fromgroups#!topic/angular/Ovn-5jVK3So

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script src="https://code.angularjs.org/1.5.5/angular.js"></script>
<div ng-controller='MyCtrl as vm'>
  {{vm.name}} {{1+2}}
</div>

JavaScript

(function() {
  'use strict';
  var y = angular.module('myApp', []);
  y.controller('MyCtrl', MyCtrl);

  function MyCtrl() {
    var x = this;
    x.name = "alekhya";
    //alert("hi");
    }
}())