JSFiddle - React, Tailwind, and code Playground

by Roman Zhak

HTML

<div ng-controller="Main">
   <div ng-init=" greeting = 'Hello, world' ">{{greeting}}</div>{{sign}}
     <hello></hello>
</div>

JavaScript

//  var app = angular.module('app', [])
//   if set alias 'Main as m'
//      .controller('Main', ["$rootScope", function($root) {
//         this.greeting = 'Welcome!';
//  }]);

  var app = angular.module('app', [])
   // set controller 
  .controller("Main", function( $scope, $log ) {
       $scope.sign = "!";
       $log.log( $scope.hasOwnProperty("greeting")  ); // => false 
       $log.log( $scope )
  })
  .directive("hello", function() {
      return {
          restrict: 'E',
          template: "<div>{{greeting}}</div>" ,
      }
  })

  angular.bootstrap(document, ['app']);