웹개발 및 최신 테크 소식을 전하는 블로그, 웹이즈프리

HOME > angularjs

AngularJS 날짜 filter를 사용한 표현 방법

Last Modified : 2017-08-11 / Created : 2017-05-24
4,785
View Count
AngularJS 날짜 filter를 사용한 표현 방법

  <body ng-app="testApp" ng-controller="testController as testCtrl">
    {{ testCtrl.title }}
    <br />
{{ testCtrl.myDate | date: 'yyyy.MM.dd HH:mm (UTC- Z)'}}
    
    <script>
      app = angular.module('testApp', []);
      app.controller('testController', function() {
        this.title = ' Timezone test';
        this.myDate = new Date;
      })
   
</script>
  </body>

또 다른 방법입니다.

$filter('date')(DATE, FORMAT)

hh : 0 ~ 12
HH : 0 ~ 23

방법



Previous

angularjs 링크함수 내부의 $watch 내부 값이 변하지 않는 경우

Previous

AngularJS 내부의 jqLite 메소드 scope() 알아보기