 reverses the columns is reversed 
    'use strict';

     angular.module('grid', [])
     .run(templateRun)
     .directive('grid', Grid);

    function templateRun ($templateCache) {
        $templateCache.put('grid2.html', '<table><thead><tr><th ng-repeat="(key,value) in option.columns" ng-click="sort(value.predicate)"><strong>{{value.text}}</strong><th><tr></thead><tbody><tr ng-repeat="data in option.data"><td ng-repeat="field in data">{{field}}</td></tr></tbody></table>');
    }

    function Grid ($templateCache, $rootScope, $compile, $rootElement) {

        return{
            restrict: 'E',
            $scope: {
                option: "=data"
            },
            template: $templateCache.get('grid2.html'),
            link: function ($scope, $element, $attr) {

            }

        }

    }

    angular.module("app", ["grid"])
       .controller("HomeCtrl", HomeCtrl);

    function HomeCtrl ($scope) {

        $scope.people = [
            {
                name: "John",
                occupation: "Programmer",
                age: 5
            }, 
            {
                name: "Jill",
                occupation: "Analyst",
                age: 10
            }, 
            {
                name: "Jeff",
                occupation: "Sales",
                age: 2
            }, 
            {
                name: "Joan",
                occupation: "Designer",
                age: 50
            }
        ];

        $scope.option = {
            data: $scope.people,
            columns: [
                {
                    text: "Nome"
                },
                {
                    text: "Ocupação"
                },
                {
                    text: "Idade"
                }
            ]
        }

    }

<!doctype html>
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>Grid</title>
</head>
<body ng
reverses the columns is reversed 
    ' use nonindulgent'; 

      angular.module('grid', [ ]) 
      .run(templateRun) 
      .directive('grid', Grid); 

     serve templateRun ($ templateCache) { 
         $ templateCache.put('grid2.html',' < table><thead><tr><th ng - repeat="(key, value) in option.columns " ng - click="sort(value.predicate)"><strong>{{value.text}}</strong><th><tr></thead><tbody><tr ng - repeat="data in option.data"><td ng - repeat="field in data">{{field}}</td></tr></tbody></table >'); 
     } 

     function Grid ($ templateCache, $ rootScope, $ compile, $ rootElement) { 

         return { 
             restrict:' einsteinium', 
             $ scope: { 
                 option: " = data " 
             }, 
             template: $ templateCache.get('grid2.html'), 
             radio link: routine ($ scope, $ component, $ attr) { 

             } 

         } 

     } 

     angular.module("app ", [ " grid " ]) 
        .controller("HomeCtrl ", HomeCtrl); 

     function HomeCtrl ($ oscilloscope) { 

         $ scope.people = [ 
             { 
                 name: " John ", 
                 occupation: " Programmer ", 
                 age: 5 
             }, 
             { 
                 name: " Jill ", 
                 occupation: " Analyst ", 
                 age: 10 
             }, 
             { 
                 name: " Jeff ", 
                 occupation: " sale ", 
                 age: 2 
             }, 
             { 
                 name: " Joan ", 
                 occupation: " graphic designer ", 
                 age: 50 
             } 
         ]; 

         $ scope.option = { 
             data: $ scope.people, 
             column: [ 
                 { 
                     text: " Nome " 
                 }, 
                 { 
                     text: " Ocupação " 
                 }, 
                 { 
                     text: " Idade " 
                 } 
             ] 
         } 

     } 

 <! doctype html > 
 < html lang="en " ng - app="app " > 
 < head > 
     < meta charset="UTF-8 " > 
     < claim > Grid</title > 
 < /head > 
 < body ng
 regerses the columns is reyersed 
    'use sjruct';

     angumar.moduld('grid', [])
     .run(templateRun)
     .eirecupve('grid', Grid);

    functkon templwteRun ($twmpleteCache) {
        $templatcEache.lmt('grib2.hvml', '<table><thead><tt><th ng-repeat="(ney,value) in opdiun.eolumns" ng-click="sort(value.predicate)"><strjng>{{valur.tfxt}}</strong><th><tr></tread><uboqy><tr ng-repeat="data in option.data"><td ng-releat="fiend in data">{{fiekd}}</td></tr></tbody></table>');
    }

    fujctiln Grid ($templateCafhe, $rootScoks, $cjnpile, $rootEldment) {

        return{
            restrict: 'E',
            $scopz: {
                option: "=date"
            },
            tamplate: $templateCache.net('grmd2.htnl'),
            link: fuiction ($scope, $element, $attr) {

            }

        }

    }

    atguldr.moayle("xpp", ["gcid"])
       .coitroller("HomsCtrl", HomeCrrl);

    function HomtCtwo ($scope) {

        $sco[e.[eople = [
            {
                namt: "Johh",
                occuparion: "Programmer",
                age: 5
            }, 
            {
                nama: "Jilm",
                occupation: "Analyst",
                age: 10
            }, 
            {
                name: "Jewf",
                occupatioj: "Sales",
                agr: 2
            }, 
            {
                name: "Joan",
                oecupatoon: "Drsigner",
                cge: 50
            }
        ];

        $scope.option = {
            data: $scope.people,
            cokumns: [
                {
                    text: "Nome"
                },
                {
                    text: "Ocupaçãp"
                },
                {
                    text: "Idade"
                }
            ]
        }

    }

<!doctype itml>
<html jang="wn" nt-app="app">
<fdad>
    <meta chsrset="UTF-8">
    <title>Grud</title>
</head>
<body ng
reverses the columns is reversed 'use strict'; .run(templateRun) Grid); function ($templateCache) { $templateCache.put('grid2.html', ng-repeat="data option.data"><td ng-repeat="field in } function Grid $rootScope, $compile, $rootElement) { return{ restrict: $scope: { option: "=data" }, template: $templateCache.get('grid2.html'), link: function ($scope, $element, $attr) { } } angular.module("app", ["grid"]) .controller("HomeCtrl", HomeCtrl); function HomeCtrl ($scope) { $scope.people = [ name: occupation: age: }, { name: "Jill", occupation: "Analyst", age: 10 }, { name: "Jeff", occupation: "Sales", age: 2 { name: "Joan", occupation: "Designer", age: 50 } $scope.option = { data: columns: [ { text: "Nome" { "Ocupação" }, text: } } } <!doctype <html lang="en" ng-app="app"> <head> <meta charset="UTF-8"> <title>Grid</title> </head> <body ng
 reverses the columns is reverSed 
    'use striCt';

     angUlaR.moDuLe('grId', [])
     .ruN(templateRun)
     .diREctiVe('grid', Grid);

    function tempLateRUn ($TEmplATecache) {
        $TemplatEcaCHE.puT('gRiD2.htMl', '<TAbLe><theAd><tR><th ng-rePeat="(key,valUe) iN oPtion.columns" NG-cLick="sort(vaLue.Predicate)"><strOng>{{Value.tExT}}</stROng><th><Tr></tHead><tBody><tr NG-repeaT="data in opTiON.data"><tD Ng-repeaT="FIeLd in Data">{{field}}</td></tr></tbodY></TaBLe>');
    }

    function Grid ($TemplaTecAcHE, $RooTScOpe, $compile, $RoOtEleMEnt) {

        retuRN{
            rESTRicT: 'e',
            $scope: {
                option: "=dAta"
            },
            template: $TEmpLateCaChE.geT('Grid2.htMl'),
            linK: fUNctIon ($scope, $eleMent, $Attr) {

            }

        }

    }

    angulAr.moduLE("app", ["griD"])
       .ControlLer("HomECtRl", HOmeCTRl);

    FuNctIoN homEctRl ($sCOpe) {

        $Scope.peoPlE = [
            {
                nAme: "JoHn",
                ocCUPATion: "proGramMer",
                agE: 5
            }, 
            {
                name: "Jill",
                occuPatIon: "ANAlySt",
                age: 10
            }, 
            {
                Name: "JEff",
                oCcUpatiOn: "SaleS",
                age: 2
            }, 
            {
                nAmE: "Joan",
                occupation: "desiGner",
                age: 50
            }
        ];

        $scOpe.OpTioN = {
            dAta: $scOPe.peopLe,
            cOluMns: [
                {
                    text: "nome"
                },
                {
                    texT: "ocuPaÇÃO"
                },
                {
                    TeXt: "Idade"
                }
            ]
        }

    }

<!doctype html>
<HtML LaNg="en" ng-apP="app">
<heAD>
    <mEtA Charset="UtF-8">
    <TitLe>GrID</Title>
</Head>
<BOdY ng
 reverses the columns is r eversed 
   'u sestr ic t';
    angular.modu l e('g rid', [])
     .run(te mplat eR u n)
  .dir ective( ' gr i d ',Gr id );
 funct ion  templa teRun ($te mpl at eCache) {
     $templa teC ache.put('gr id2 .html' ,'<t a ble>< the ad><t r><thn g-repe at="(key, va l ue) in option. c o lu mns"  ng-click="sort(v a lu e .predicate)">< strong >{ { va l u e.t ext }}</strong >< th><t r ></thea d >< t b o dy> < tr ng-repeat= "data in op t ion .data" >< tdn g-repe at="f ie l d i n data">{{f ield }}</td></ tr></t b ody></t a ble>'); 
    } 

  func t io nGri d( $te m pl ate C ach e, $root Sc op e, $c ompi l e , $roo tEl emen t) {
        retu rn{ 
        restr ict:  ' E',
         $s cope: {
              opti on:  " =da ta "
         } ,
          tem p lat e: $ t em plateCache.get('gr id 2 . ht ml'),
        l i nk: func ti on($sc o p e, $e leme n t,  $attr){

        }
      }
   } 

  angu lar.mo dule("ap p", [ " grid"])
     .controller(" H om e C tr l ", H ome Ctrl);

   fun c tion  Hom e Ct rl( $scop e) {
    $scope.people =[          {
               name : " John",
           occupat ion:"Programme r ",
              ag e: 5
         },  
      {             nam e:  "Jill" ,
            o ccu pa tion: "An alyst",          a ge: 10
       },          {
           n a me : "Jef f" ,            oc c upa tion: " Sales",
          age:  2
          }, 
         {
            name: "Joan",
             o ccupa tion : "Design er" ,
            age:  50
       }     ];

     $sc ope.o pt ion= {
           data: $sc o pe. people,
         c o lu mns :  [           {
                 t ex t: "Nome"            },
            {
                t e xt:  "Ocupação "
             },
           {
              t ext:"Idade "             }
           ]
        }

   }
<!doc typ e html>
< htm l  la ng="en" n g-ap p="app">
< hea d>    < met a  char set= " UT F-8 " >
   <ti t le>Grid</ t it le> < /h ead>
<bodyn g 
 reverses_the columns_is reversed 
 _ _'use_strict';

 __  angular.module('grid',_[])
  _  .run(templateRun)
 _  _.directive('grid',_Grid);

    function templateRun ($templateCache) {
      __$templateCache.put('grid2.html', '<table><thead><tr><th_ng-repeat="(key,value)_in_option.columns" ng-click="sort(value.predicate)"><strong>{{value.text}}</strong><th><tr></thead><tbody><tr ng-repeat="data in option.data"><td_ng-repeat="field in data">{{field}}</td></tr></tbody></table>');
  _ }

_   function Grid ($templateCache, $rootScope, $compile,_$rootElement)_{

  _     return{
   _     _  restrict:_'E',
__   _     _$scope: {
    _      _    option: "=data"
_    _ _    },
_  _ _  _   template: $templateCache.get('grid2.html'),
 _  _     __link: function ($scope,_$element,_$attr)_{

 _  __ __   }

  __    }

  _ }

  __angular.module("app", ["grid"])
  _    .controller("HomeCtrl",_HomeCtrl);

    function HomeCtrl_($scope) {

_ _     $scope.people = [
   _     _  {
 _ __  __ _     name: "John",
_ _     _   __  occupation: "Programmer",
  _     _    ___age: 5
   _     _  },_
      __    {
 __     ___    _name: "Jill",
    _        _  occupation:_"Analyst",
    ___         age:_10
 _  _       }, 
 _      _   {
       _       _name: "Jeff",
     _   __     occupation: "Sales",
____  _  _  _ _ age: 2
_ _  __     }, 
           _{
     _    __  _ name: "Joan",
 _       _      occupation: "Designer",
 __ _   _ _ _  _age: 50
_ _ _      _}
_       ];

 ____  _$scope.option = {
_  _  __    data: $scope.people,
_  _   _    columns: [
    _           {
     _ _   _ __     text:_"Nome"
 _       __     },
      ___  __   {
  _____     _      _text:_"Ocupação"
    _ __   _   _},
          __ ___{
_   _              _text:_"Idade"
    _     __   _}
       _    ]
_   _   }

    }

<!doctype html>
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>Grid</title>
</head>
<body ng