将角度材质转换为TypeScript

时间:2017-08-08 11:21:43

标签: angularjs typescript angularjs-material

我刚刚学习AngularJS,我已经学习了主要使用TypeScript的教程。我现在想在我的应用程序中使用Angular Materials,我需要的组件是用JS编写的。

来自https://material.angularjs.org/latest/demo/slider#vertical

angular.module('sliderDemo2', ['ngMaterial'])

.controller('AppCtrl', function($scope) {

  $scope.vol = Math.floor(Math.random() * 100);
  $scope.bass = Math.floor(Math.random() * 100);
  $scope.master = Math.floor(Math.random() * 100);
});

这看起来像转换为TypeScript?

1 个答案:

答案 0 :(得分:1)

如果您正在学习Angular(而不是AngularJS),只需使用Angular Material for Angular 2/4,它将用typescript编写: https://material.angular.io/components/slider/overview

相关问题