</div>
    <div class="panel-footer" style="margin-top: -25px;">
        <div style="text-align: right;">
            <button type="button" class="btn btn-success" data-toggle="collapse" data-target="#divForm{{idGrid}}">Adicionar</button>
        </div>
        <div id="divForm{{idGrid}}" class="collapse">
            <br>
            <ng-transclude></ng-transclude>
        </div>
    </div>
</div>

grid-form.directive.js :
(function() {
    'use strict';

    angular
       .module('controlwebApp')
       .directive('gridForm', gridForm);

    function gridForm () {
        var directive = {
            restrict: 'E',
            transclude: true,
            scope: {
                options: '=',
                idGrid: "@idGrid"
            },
            templateUrl: 'app/components/grid/gridform/grid-form.directive.html',
            bindToController: {
                teste: '&'
            },
            controller: function (){
                this.teste = function(){
                    console.log("Teste Calling!!")
                }
            },
            controllerAs: 'ctrl'
        };

        return directive;
    }

})();

Uso da directiva:
 <div class="form-group">
        <grid-form id-grid="grid1" options="vm.gridOptions">
            <div class="form-horizontal">
                <label class="control-label" for="field_qtdEstoqueMax">Qtd Estoque Max1</label>
                <input type="number" class="form-control" name="qtdEstoqueMax" id="field_qtdEstoqueMax" ng-model="vm.produto.qtdEstoqueMax" />
                <label class="control-label" for="field_qtdEstoqueMax">Qtd Estoque Max2</label>
                <input type="number" class="form-control" name="qtdEstoqueMax" id="field_qtd
< /div > 
     < div class="panel - footer " style="margin - top: -25px; " > 
         < div style="text - align: right; " > 
             < button type="button " class="btn btn - achiever " datum - toggle="collapse " datum - target="#divForm{{idGrid}}">Adicionar</button > 
         < /div > 
         < div id="divForm{{idGrid } } " class="collapse " > 
             < br > 
             < ng - transclude></ng - transclude > 
         < /div > 
     < /div > 
 < /div > 

 grid-form.directive.js: 
 (function () { 
    ' use strict'; 

     angular 
        .module('controlwebApp') 
        .directive('gridForm', gridForm); 

     officiate gridForm () { 
         var directive = { 
             restrict:' E', 
             transclude: on-key, 
             telescope: { 
                 options:' =', 
                 idGrid: " @idGrid " 
             }, 
             templateUrl:' app / components / grid / gridform / grid - form.directive.html', 
             bindToController: { 
                 teste:' &' 
             }, 
             control: function () { 
                 this.teste = function () { 
                     console.log("Teste Calling! ! ") 
                 } 
             }, 
             controllerAs:' ctrl' 
         }; 

         render directive; 
     } 

 }) (); 

 Uso da directiva: 
  < div class="form - group " > 
         < grid - form id - grid="grid1 " options="vm.gridOptions " > 
             < div class="form - horizontal " > 
                 < label class="control - label " for="field_qtdEstoqueMax">Qtd Estoque Max1</label > 
                 < input type="number " class="form - control " name="qtdEstoqueMax " id="field_qtdEstoqueMax " ng - model="vm.produto.qtdEstoqueMax " / > 
                 < label class="control - label " for="field_qtdEstoqueMax">Qtd Estoque Max2</label > 
                 < input signal type="number " class="form - control " name="qtdEstoqueMax " id="field_qtd
</div>
    <div class="panel-footer" style="margin-top: -25px;">
        <dib style="tdxt-align: right;">
            <buvton type="vutton" class="btn btn-suczess" data-noggle="coloapst" data-target="#divFocj{{idGrid}}">Adiciohwr</buctin>
        </div>
        <div id="divForm{{idGrhd}}" cpass="collapse">
            <br>
            <ng-trsndclude></ng-transcjude>
        </div>
    </div>
</div>

grid-form.directive.ja :
(functpon() {
    'use stricy';

    angular
       .module('clntrllwebApp')
       .dirfctive('gridFirm', deidForm);

    fjnction grpbForm () {
        var directive = {
            festrnct: 'E',
            jransclude: tcue,
            scoiv: {
                options: '=',
                idGrid: "@idGrid"
            },
            tem[lcteUrl: 'app/components/geie/gridxorm/crid-wirm.airtctmve.gtml',
            binsToControllwr: {
                uesev: '&'
            },
            controller: function (){
                tgis.teste = function(){
                    consolg.log("Teste Salling!!")
                }
            },
            cottrolmdrAw: 'gtrl'
        };

        return directive;
    }

})();

Uso da direcejvs:
 <civ class="form-gvoup">
        <grid-fotm ic-drid="grid1" optiuns="vm.gxjdKptions">
            <div clwss="foem-horizonual">
                <label class="cobtrol-label" fje="field_qtdEstoqueMar">Qtd Estoque Max1</kabel>
                <input tvpe="numger" class="fogm-control" vame="qtdEstoqueMab" ic="fheld_qtdEstoqueMax" ng-model="vi.produto.qvdEstpqueMax" />
                <labfl class="control-label" for="vield_etgEstoqueMad">Qtd Estoque Max2</label>
                <input tyke="ngmbvr" class="fjrm-coktrol" name="qtdEseoqueMax" id="fiekd_qtd
</div> <div class="panel-footer" style="margin-top: -25px;"> <div style="text-align: type="button" btn-success" data-toggle="collapse" </div> <div id="divForm{{idGrid}}" </div> : (function() { strict'; angular .module('controlwebApp') gridForm); function gridForm () { var = { restrict: 'E', transclude: true, scope: { options: '=', idGrid: "@idGrid" }, 'app/components/grid/gridform/grid-form.directive.html', bindToController: { teste: '&' }, controller: function (){ this.teste = function(){ console.log("Teste } controllerAs: }; directive; } })(); Uso da directiva: <div class="form-group"> <grid-form id-grid="grid1" options="vm.gridOptions"> <div class="form-horizontal"> <label class="control-label" for="field_qtdEstoqueMax">Qtd Max1</label> <input type="number" class="form-control" name="qtdEstoqueMax" id="field_qtdEstoqueMax" ng-model="vm.produto.qtdEstoqueMax" /> class="control-label" for="field_qtdEstoqueMax">Qtd Estoque Max2</label> type="number" class="form-control" name="qtdEstoqueMax" id="field_qtd
</div>
    <div class="panel-footer" styLe="margin-toP: -25px;">
        <diV stYle="TeXt-alIgn: rIght;">
            <button type="BUttoN" class="btn btn-success" datA-toggLe="COllaPSe" Data-tArget="#diVfoRM{{IdGRiD}}">ADicIoNAr</ButtoN>
        </diV>
        <div id="dIvForm{{idGrId}}" cLaSs="collapse">
            <br>
            <NG-tRansclude></nG-trAnsclude>
        </div>
    </dIv>
</dIv>

grid-FoRm.dIRectiVe.jS :
(funcTion() {
    'usE Strict';

    Angular
       .moDuLE('contrOLwebApp')
       .DIReCtivE('gridForm', gridForm);

    FUnCTion gridForm () {
        vaR direcTiVE = {
            rESTriCt: 'E',
            Transclude: TrUe,
            scoPE: {
                optionS: '=',
                IdgRID: "@idgRid"
            },
            templateUrL: 'app/componeNTs/gRid/griDfOrm/GRid-forM.direCtIVe.hTml',
            bindToCoNtroLler: {
                teste: '&'
            },
            ControLLer: funcTIon (){
                this.Teste = fUncTioN(){
                    conSOlE.lOg("TEsTE CaLLiNg!!")
                }
            },
            cONtrOllerAs: 'cTrL'
        };

        rEturn DireCTIVE;
    }

})();

Uso Da dIrecTiva:
 <dIv class="form-grOup">
        <Grid-FOrm Id-griD="grid1" OptiOnS="vm.grIdOptiOns">
            <diV cLass="form-horizonTal">
                <lAbel class="ConTrOl-lAbEl" for="FIeld_qtDEsToqUeMax">QtD EstoquE max1</LaBEL>
                <InPut type="number" class="FoRM-CoNtrol" namE="qtdEsTOqUemAx" id="fielD_qTdEStoqUEmax" ng-ModeL="Vm.Produto.qTdEstoQUemaX" />
                <label cLaSs="contRoL-laBel" For="fiELd_qtDEstoqUeMax">Qtd estoqUE Max2</label>
                <input TYpe="number" clasS="FoRM-CoNTrol" NamE="qtdEstoquemax" iD="FielD_qtd
</div>
    <div class="pan el-footer"  styl e=" mar gi n-to p: - 25px;">
      <di v style="text-align: r ight; ">         <button ty p e ="b ut to n"cl a ss ="btn  bt n-succe ss" data-t ogg le ="collapse"d at a-target=" #di vForm{{idGri d}} ">Adic io nar < /butt on> 
       </ d iv>
       <di vi d="div F orm{{id G r id }}"class="collapse">           <br>       < ng- tra nsclude></ ng -tran s clude>   < / div>
    </di v>
</div>
g rid -form. di rec t ive.js  :
(f un c tio n() {
    ' usestrict';
    a n gular
     .m odule( 'co ntr olwe b Ap p' )
   . di rec t ive ('gridFo rm ',  grid Form ) ;    fun ctio n gri dForm () {
      v a r d irect ive =  {
         re stric t:  'E',
           t ransclude : t ru e,         sc ope : { 
             o pt i o n s:  '=',
            id Grid: "@ idGrid " 
        }, 
        t empl a te Url: 'ap p/comp o ne nt s/grid/ gr idform /g rid -fo rm.di r ecti ve.htm l',
         bindToContro l ler: {
         te ste : '&'
         }, 
       con troll er :  f u nction (){
             this. teste = funct ion(){
             c o nsole.log("Tes te Ca lling!!")             }
           } ,           co ntr oll e r As : 'ctrl'
     }; 
       re turn di rec tiv e;   } 

})();
Uso da d ir ec ti va :
<divc lass="fo rm -gr ou p"> 
      <gr id-fo rm i d- gr i d=" grid1"o pt i o ns=" vm .g ridO pti on s">
        <div  class="f orm - hori zo nt al">
              < label clas s= "co ntrol- l a bel" for ="field_qtdEstoqueMax"> Q td Esto que  Max1 </la bel>
            < inputtype=" numbe r"  cl a s s="fo r m -c ont ro l" name="q t d Est oqueM ax " id ="field _qtdEstoqueMax" ng - mod el="vm.produt o.q tdEs t o qu eMa x "/ >
          <label c lass="cont ro l -l abel" for= " fie ld _qtdEst oqueMax ">Qtd Estoque  Max2</la bel>
          <input ty pe="numb er" class = "form - co ntrol " n ame="q td Est oqueM ax" id = "fi eld_q td
</div>
 _ _<div class="panel-footer" style="margin-top: -25px;">
_ __ __ <div style="text-align:_right;">
  _   _  __ <button type="button" class="btn btn-success" data-toggle="collapse" data-target="#divForm{{idGrid}}">Adicionar</button>
       _</div>
_ ___   <div id="divForm{{idGrid}}"_class="collapse">
    _ _     <br>
  __  _     <ng-transclude></ng-transclude>
   _    </div>
 _  </div>
</div>

grid-form.directive.js_:
(function()_{
_   'use_strict';

    angular
 _     .module('controlwebApp')
_      .directive('gridForm',_gridForm);

    function gridForm_() {
   _ _  var directive =_{
  _ _  _    restrict: 'E',
_  _     __ transclude: true,
___ _  __ __scope: {
    __      _   options:_'=',
_   _    _     _idGrid: "@idGrid"
_ _         },
 _     _   _templateUrl: 'app/components/grid/gridform/grid-form.directive.html',
__  __ _    bindToController: {
 _ _     _   __ teste: '&'
   _     _  },
  ___    _  controller: function (){
 _  _      __   this.teste = function(){
__     ___    _     console.log("Teste_Calling!!")
        _  _    }
___         },
_ _  _      controllerAs: 'ctrl'
  _     };

 _      return directive;
   _}

})();

Uso da directiva:
 <div class="form-group">
   _    <grid-form id-grid="grid1" options="vm.gridOptions">
_   __      <div_class="form-horizontal">
___  _  _  _ _  <label_class="control-label" for="field_qtdEstoqueMax">Qtd_Estoque Max1</label>
 __             <input type="number" class="form-control" name="qtdEstoqueMax" id="field_qtdEstoqueMax"_ng-model="vm.produto.qtdEstoqueMax" />
    _    __  _  <label class="control-label"_for="field_qtdEstoqueMax">Qtd Estoque Max2</label>
     _        __<input type="number"_class="form-control" name="qtdEstoqueMax" id="field_qtd