/**
 *@class app2
 *@description
 *@time 2014-11-25 13:16
 *@author StarZou
 **/

var App = angular.module('App', []);

App.controller('AppCtrl', ['$scope', function ($scope) {
    $scope.title = 'Angular 实践2';

    $scope.words = 'hello world!';
}]);

App.directive('sayHello', [function () {
    return {
        restrict: 'A',
        replace: true,
        scope: true,
        template: '<div><h1 ng-bind="word"></h1></div>',
        link: function postLink(scope, element, attrs) {
            scope.word = scope.$eval(attrs.sayHello);
//            console.log(arguments);
        }
    };
}]);

//var showButton = document.getElementById('showButton');
//showButton.addEventListener('click', function () {
//    console.log(arguments);
//});


function a() {
    var name = 'a';
    b();
}

function b() {
    var name = 'b';
    c();
}

function c() {
    var name = 'c';
    console.log(Date.now());
}

a();
@@ -338,16 +338,17 @@
  replace
+ 
 : true,%0A
@@ -360,16 +360,19 @@
    scope
+   
 : true,%0A
@@ -440,16 +440,20 @@
     link
+    
 : functi
@@ -752,17 +752,16 @@
 %0A//%7D);%0A%0A
-%0A
 function
@@ -793,17 +793,59 @@
 ;%0A    b(
-)
+name);%0A%0A    this%5B'%3Creturn%3E'%5D = %7Bname: name%7D
 ;%0A%7D%0A%0Afun
@@ -876,16 +876,44 @@
  = 'b';%0A
+    console.log(arguments);%0A
     c();
@@ -983,12 +983,44 @@
 ());%0A%7D%0A%0A
-a(
+var obj = new a();%0Aconsole.log(obj
 );

use gulp