Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<meta charset=utf-8 />
</head>
  
<body ng-controller="lotteryCtrl">
  
  <select ng-model="Select1" required ng-options="lottery.ProductName for lottery in lotteryModel">
    
  </select>
  <br />
  
  <div class="animate-switch-container" ng-switch on="Select1.ProductName">
        <div ng-switch-when="威力彩">威力彩</div>
        <div ng-switch-when="今彩539">今彩539</div>
        <div ng-switch-default>大樂透</div>
    </div>
  
  
  <!--<p>{{ Select1.ProductName }}</p>-->
  
</body>
</html>
 
.animate-switch-container {
  
  padding-top:20px;
  
}
 
function lotteryCtrl($scope)
{
  $scope.lotteryModel = [
    {
      id: 1,
      ProductName: '威力彩'
    },
    {
      id: 2,
      ProductName: '今彩539'
    },
    {
      id: 3,
      ProductName: '大樂透'
    }];
  
  $scope.Select1 = $scope.lotteryModel[0];
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
annaismepro
0viewers