Why would anyone start learning Angular 1 today?

Why in the world would you want to start learning angular now when all the other frameworks are so close to being released, my main reason for all the hard problems have all ready been solved in angular 1.

Getting Started with Angular 1

Where to start, I would start with CodeSchool's Angular course it explains the basics much better than any other site or blog post that I have found.

Step 1

Lets create a simple webpage.

  • Create a folder. mkdir example
  • Create a file in the above folder called index.html with the content below.
<html>
<body>
    <div>Hello World<div>
</body>
</html>
  • Double click index.html and you will see a webpage with Hello World

Step 2

Replace the content in index.html with the below snippet.

<html data-ng-app="app">
<body>
    <div data-ng-controller="Shell as vm">{{vm.greeting}}<div>

    <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.7/angular.js"></script>
    <script>
        (function() {
            angular
                .module('app', [])
                .controller('Shell', Shell);

            function Shell() {
                var vm = this;
                vm.greeting = "Hello World";
            }
        })();
    </script>
</body>
</html>

Step 3

Get creative, your imagination is your only limitation.

Gert

About me? I have been programming since I can remember if it wasn’t the video recorder for my mum, then it was whatever electronic device I can get my hands on.

Brisbane