Blame view

example/radio.html 1.49 KB
3a3ecabe   Imshann   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  <!DOCTYPE html>
  <html>
  
  <head>
      <meta charset="UTF-8" />
      <title></title>
      <link href="https://cdn.staticfile.org/antd/3.26.9/antd.css" rel="stylesheet" />
      <style>
          .container > div {
              margin-bottom: 10px;
          }
      </style>
  </head>
  
  <body>
      <div ng-app="esNgAntd" ng-controller="mainCtrl">
          <div class="container" style="padding: 50px">
              <div>
                  <es-radio-group on-change="handleChange(event)" value="1">
                      <es-radio value="1">Radio1</es-radio>
                      <es-radio value="2">Radio2</es-radio>
                      <es-radio value="3">Radio3</es-radio>
                   </es-radio-group>
              </div>
              <div>
                  <!-- <es-radio-group on-change="handleChange(event)" value="a">
                      <es-radio-button value="a">Radio1</es-radio-button>
                      <es-radio-button value="b">Radio2</es-radio-button>
                      <es-radio-button value="c">Radio3</es-radio-button>
                  </es-radio-group> -->
              </div>
          </div>
      </div>
      <script src="https://cdn.staticfile.org/angular.js/1.2.28/angular.min.js"></script>
      <script src="../dist/ng-antd.js"></script>
      <script>
          angular
              .module("esNgAntd")
              .controller("mainCtrl", function ($scope) {
                  $scope.handleChange = function(event) {
                      console.log(event.target.value)
                  }
              });
      </script>
  </body>
  
  </html>