equalsIgnoreCase("title")) {
                    orderItems.add(orderParser.nextText());
                }

            }

 Q:

Calling filter from different JS file in Controller

I have a controller that was residing in a separate file named as EmployeeCtrl.js. Inside this controller I have a filter called convertJsonDate to convert JsonResult date format to normal format MM/dd/yyyy hh:mm:ss.
My question now is, how do I make this filter reusable in different controller in the future? I have read that you can add your filter in a separate js file filters.js and inject it to your controller, but I don't know to implement this.
TIA
app.js
(function () {
'use strict';

angular.module('app', []);
})();

EmployeeCtrl.js
(function () {
'use strict';

var app = angular.module('app');

app.filter('convertJsonDate', ['$filter', function ($filter) {
    return function (input, format) {
        return (input)? $filter('date')(parseInt(input.substr(6)), format) : '';
    };
}]);

app.controller('app.EmployeeController', ['$scope', 'app.EmployeeService', function ($scope, EmployeeService) {

    GetAllEmployee();

    $scope.sortColumnBy = function (keyname) {
        $scope.sortKey = keyname;
        $scope.reverse =!$scope.reverse;
    }

    $scope.employee = {
        employeeId: '',
        firstName: '',
        lastName: '',
        password: '',
        daysPerWeek: 0,
        active: true,
        departmentId: 0,
        accountTypeId: 0
    };

    $scope.clear = function () {
        $scope.employee.employeeId = '';
        $scope.employee.firstName = '';
        $scope.employee.lastName = '';
        $scope.employee.password = '';
        $scope.employee.daysPerWeek = 0;
        $scope.employee.active = false;
        $scope.employee.departmentId = 0;
        $scope.employee.accountTypeId = 0;
    };
equalsIgnoreCase("title ") ) { 
                     orderItems.add(orderParser.nextText ()); 
                 } 

             } 

  Q: 

 Calling filter from different JS file in Controller 

 I have a controller that was rest in a freestanding file named as EmployeeCtrl.js. Inside this controller I have a filter call convertJsonDate to convert JsonResult date format to normal format MM / dd / yyyy hh: mm: ss. 
 My question immediately is, how do I have this filter reusable in unlike control in the future? I have read that you can total your filter in a separate js file filters.js and inject it to your restrainer, but I don't acknowledge to implement this. 
 TIA 
 app.js 
 (function () { 
' use strict'; 

 angular.module('app', [ ]); 
 }) (); 

 EmployeeCtrl.js 
 (function () { 
' practice strict'; 

 var app = angular.module('app'); 

 app.filter('convertJsonDate', [' $ filter', function ($ filter) { 
     return routine (input, format) { 
         return (input signal)? $ filter('date')(parseInt(input.substr(6) ), format):"; 
     }; 
 } ]); 

 app.controller('app. EmployeeController', [' $ scope',' app. EmployeeService', affair ($ scope, EmployeeService) { 

     GetAllEmployee (); 

     $ scope.sortColumnBy = function (keyname) { 
         $ scope.sortKey = keyname; 
         $ scope.reverse =! $ scope.reverse; 
     } 

     $ scope.employee = { 
         employeeId:", 
         firstName:", 
         lastName:", 
         password:", 
         daysPerWeek: 0, 
         active: true, 
         departmentId: 0, 
         accountTypeId: 0 
     }; 

     $ scope.clear = function () { 
         $ scope.employee.employeeId ="; 
         $ scope.employee.firstName ="; 
         $ scope.employee.lastName ="; 
         $ scope.employee.password ="; 
         $ scope.employee.daysPerWeek = 0; 
         $ scope.employee.active = false; 
         $ scope.employee.departmentId = 0; 
         $ scope.employee.accountTypeId = 0; 
     };
equwlsIgnoreCase("title")) {
                    orderItxms.add(odderParsdr.nextText());
                }

            }

 Q:

Calling filter frum differvnt JS fioe ii Controller

I hats a conbxolled thac xas residing in a separata file named av Dm'loyeeCtrl.js. Inside this controller Y have s vilter called sonvtrtTsonSate to convert JsonResult date fodmat to normal formay MM/dd/yyyy hh:mm:ss.
My questiln nlw is, how do I makf this filtgd rqysable in diwferent controller in jhe future? I have read that you zan abd your filjze ij a separate js fple filters.js and injact it yo your controklec, bur I don't know to implxment this.
TIA
app.js
(fugction () {
'uve strict';

angular.modylw('app', []);
})();

GmplofeeCgel.jr
(fuhcvioh () {
'use stcict';

var app = angular.moeule('app');

app.filter('confewnKsonDate', ['$filfer', fugceion ($filter) {
    return function (input, fmrmzt) {
        return (input)? $filter('date')(parseInt(inkut.substr(6)), sormat) : '';
    };
}]);

app.controller('app.EmployeeController', ['$scmpe', 'a'p.DmpooneeSdevlce', function ($scope, EmployeeService) {

    GetAllQjpkojee();

    $scope.sortCjlumnBy = fumchipg (keyname) {
        $sekps.sortKey = keyname;
        $fcope.eeverse =!$ssope.teverse;
    }

    $scope.employew = {
        eiployeeId: '',
        fnrstName: '',
        lastMame: '',
        password: '',
        daysPerWfek: 0,
        active: true,
        gepartmentId: 0,
        accougtTypeId: 0
    };

    $scooe.clgar = fugction () {
        $scope.employee.emplojeeId = '';
        $sclpe.employee.firstName = '';
        $srppe.employee.lssdNake = '';
        $sgope.employee.pasfword = '';
        $scope.eiployde.daysPerWvek = 0;
        $scope.em[loyee.active = valse;
        $scope.em[loywe.departmengKd = 0;
        $scppe.employve.cccountTypeId = 0;
    };
equalsIgnoreCase("title")) { orderItems.add(orderParser.nextText()); } } Q: Calling different file in I have a a file named as Inside this controller have a filter called convertJsonDate to JsonResult date format to normal format MM/dd/yyyy hh:mm:ss. My question now is, how I make this filter reusable in different controller in the future? I have that can your in a separate js file filters.js and inject it to your controller, but I don't know implement this. TIA app.js (function () { 'use angular.module('app', []); })(); EmployeeCtrl.js () { 'use strict'; var = app.filter('convertJsonDate', ['$filter', ($filter) return (input, format) { (input)? $filter('date')(parseInt(input.substr(6)), format) : ''; }; }]); app.controller('app.EmployeeController', ['$scope', 'app.EmployeeService', function ($scope, EmployeeService) { GetAllEmployee(); $scope.sortColumnBy = (keyname) { keyname; $scope.reverse } = employeeId: '', firstName: '', password: '', daysPerWeek: 0, active: accountTypeId: 0 }; $scope.clear = function () { = ''; = ''; $scope.employee.lastName = ''; $scope.employee.password ''; $scope.employee.daysPerWeek = 0; $scope.employee.active = false; $scope.employee.departmentId 0; $scope.employee.accountTypeId = 0; };
equalsIgnoreCase("title")) {
                    ordeRItems.add(oRderPArsEr.nExTTexT());
                }

            }

 Q:

CaLling filter froM DiffErent JS file in ControlleR

I havE a COntrOLlEr thaT was resIDiNG In a SePaRatE fILe Named As EMployeectrl.js. InsiDe tHiS controller I HAvE a filter caLleD convertJsondatE to conVeRt JSOnResUlt Date fOrmat tO Normal Format MM/dD/yYYy hh:mm:SS.
My quesTIOn Now iS, how do I make this fiLTeR Reusable in diffErent cOnTRoLLEr iN thE future? I haVe Read tHAt you caN AdD YOUr fILter in a separaTe js file filTErs.Js and iNjEct IT to youR contRoLLer, But I don't knoW to iMplement tHis.
TIA
APp.js
(funCTion () {
'use Strict';

AngUlaR.modULe('ApP', []);
})();

EmPlOYeecTrL.js
(FUncTion () {
'use sTrIcT';

var aPp = anGULAR.modUle('App');

aPp.filTer('convertJsoNDaTe', ['$fiLTer', FunctIon ($fiLter) {
    ReTurn fUnctioN (inpuT, fOrmat) {
        return (inpuT)? $filTer('date')(paRseinT(inPuT.subsTR(6)), formaT) : '';
    };
}]);

apP.coNtrolleR('app.EmpLOyeECONTRoLler', ['$scope', 'app.EmployEesERvIce', functIon ($scoPE, EMpLOyeeServIcE) {

    GeTAlleMPloyeE();

    $scoPE.sOrtColumNBy = funCTiOn (Keyname) {
        $ScOpe.sorTKEy = kEynAme;
        $scOPe.reVerse =!$sCope.reveRse;
    }

    $scOPe.employee = {
        emplOYeeId: '',
        firstNamE: '',
        LaSTnaME: '',
        pasSwoRd: '',
        daysPerWeEk: 0,
        acTIve: tRue,
        dEPaRtmENtId: 0,
        aCcounTTYPeiD: 0
    };

    $scope.clear = function () {
        $ScOpe.empLoyee.EmployeeId = '';
        $scoPe.employee.FIRStName = '';
        $scOpe.eMPlOYee.lastName = '';
        $scoPe.empLoyee.passwORd = '';
        $scope.eMployEe.daysPeRWeek = 0;
        $scopE.EMployee.aCtiVe = fAlsE;
        $scOPE.eMployee.departMENtId = 0;
        $ScOpe.emplOyeE.accounTTyPeID = 0;
    };
equalsIgnoreCase("title"))  {
               orde rIte ms.add(orderPa r ser. nextText());
             } 

        }

 Q : 
C a lli ng  f ilt er fr om di ffe rent JS  file in C ont ro ller

I have acontroller  th at was resid ing  in ase par a te fi lenamed  as Em p loyeeC trl.js. I ns i de thi s  contro l l er  I h ave a filter call e dc onvertJsonDate  to co nv e rt J son Res ult date f or mat t o  normal fo r m a t M M /dd/yyyy hh:m m:ss.
My qu e sti on now  i s,h ow doI mak et his  filter reu sabl e in diff erentc ontroll e r in th e futu re?  Ihave re ad  th at you ca n a d d y our filt er  i n a s epar a t e js f ile  fil ters. js and inject  it  toy our  cont rolle r, b ut  I do n't kn ow to  i mplement this.TIAapp.js
(f unc ti on()  {
'u s e stri ct' ;
angular .module ( 'ap p' , [ ]) ;
})();

EmployeeC tr l . js 
(functi on (){ 
' us e  strict' ;
va r ap p = ang ular . mo dule('ap p');
a pp .f ilter(' co nvertJ so nDa te' , ['$ f ilte r', fu nction ( $filt e r) {
    retur n  function (in p ut , fo r mat)  {        ret urn( inpu t)?$ fi lte r ('dat e')(p ar s eI n t(input.substr(6)),  f ormat)  : '' ;
    };
}]); 

app.cont r o l ler('app .Emp l oy e eController',['$sc ope', 'app . Employee Servi ce', fun ction ($s c o pe, Empl oye eSe rvi ce) { 
    GetAllEmp l o yee( ); 

    $ sco pe.sort Col umn By= f un ction (ke yname) { 
    $s cope. s ortKey =  k eyn am e;      $sco pe.re vers e=! $ sco pe.reve r se ;    }
   $ sco pe .empl oyee = { 
       employe eId :  '', 
      fi rstName: '',       last Na me:  '',
     pas sword: '',
        days P erWeek:  0, 
      active: t rue ,
     depart mentId : 0,    acco u n tT ype Id : 0
    };    $sco pe .cle ar = fu nction () {
      $s cope.employee .em ploy e e Id  =' ';      $ s c ope.employee.fi rstName ='' ; 
       $sc o pe. em ployee. lastNam e = ' ' ;
       $scope .employee .p assw o r d =  '';
       $scop e.employe e .days P er Week= 0 ;
      $ scope .emplo y ee. activ e = fa ls e;
      $s cope.emp loyee.departmentId = 0; 
       $s cop e.employe e.a c cou ntTypeId= 0; 
    };
equalsIgnoreCase("title")) {
_ _   _ __ __  _  _ orderItems.add(orderParser.nextText());
  _  __         }

    __ ___  }

 Q:

Calling filter_from different JS file in_Controller

I have_a controller that was residing in a separate_file_named as EmployeeCtrl.js._Inside this controller I have a filter called convertJsonDate_to convert JsonResult date format to_normal format MM/dd/yyyy_hh:mm:ss.
My_question_now is, how do_I make this filter reusable in_different controller in the future? I_have read that you can add your_filter in a separate js file_filters.js and inject it to_your controller,_but I don't know to_implement this.
TIA
app.js
(function ()_{
'use strict';

angular.module('app',_[]);
})();

EmployeeCtrl.js
(function () {
'use_strict';

var app = angular.module('app');

app.filter('convertJsonDate', ['$filter', function_($filter) {
 _  return function (input, format)_{
_  ___ _return (input)? $filter('date')(parseInt(input.substr(6)),_format)_: '';
__  };
}]);

app.controller('app.EmployeeController', ['$scope', 'app.EmployeeService', function_($scope,_EmployeeService) {

    GetAllEmployee();

 _  $scope.sortColumnBy =_function_(keyname) {
  _    _$scope.sortKey = keyname;
   _ _ _$scope.reverse =!$scope.reverse;
    }

    $scope.employee =_{
     _  employeeId: '',
_ __  __firstName: '',
_      _lastName: '',
_     _ password: '',
 __     daysPerWeek:_0,
     _  active: true,
 ___    departmentId:_0,
     _  accountTypeId:_0
    };

  __$scope.clear = function () {
 __     $scope.employee.employeeId_=_'';
_    _  $scope.employee.firstName = '';
 _      $scope.employee.lastName = '';
_  _    $scope.employee.password_=_'';
_       $scope.employee.daysPerWeek = 0;
_ _  _  $scope.employee.active = false;
     _  $scope.employee.departmentId = 0;
  _     $scope.employee.accountTypeId = 0;
   _};