Tuesday, May 31, 2016

VueJs Hello-World Example 1

<html>
    <head>
    <script src="vue.min.js"></script>
    </head>
    <body>
            <div id="app">
                    <h1>{{message}}</h1>
            </div>
            <script>
                new Vue({
                    el:'#app',
                    data:{
                        message:'Hello World Vuejs King.!!'
                    }
                })
            </script>
    </body>
</html>

Wednesday, May 11, 2016

Hello World with AngularJS demo

examples/angular/index.html
 --------------------------------------------
 <html>
 <head>
     <script src="angular.min.js"></script>
    <script src="hello_world_controller.js"></script>
 </head>
    <div ng-app="HelloWorldApp">
        <div ng-controller="HelloWorldController">
            <h1>Welcome : {{greeting}}</h1>
        </div>
    </div>
</html>

 examples/angular/app.js
 -----------------------
     angular.module('HelloWorldApp', [])
       .controller('HelloWorldController', function($scope) {
           $scope.greeting = "Hello World";
    });

    Output: Welcome : Hello World