如何将Angular代码转换为ES5

时间:2017-09-20 11:59:02

标签: angular

  $rootScope.$on("$routeChangeStart",
    (event, current, previous, rejection) => {
      if (/#\//.test($window.location.hash)) {
        $location.path($window.location.hash.replace('#', ''));
      }
});

如何转换为ES5?

我想删除=>代码因为uglify无法使用它...

1 个答案:

答案 0 :(得分:2)

  $rootScope.$on("$routeChangeStart",
   function(event, current, previous, rejection) {
    if (/#\//.test($window.location.hash)) {
      $location.path($window.location.hash.replace('#', ''));
    }
 });