angularJS小实例、小案例,有源码,有详细注释,copy源码即可看到效果。
效果图
可以自己新增或删除奖品
案例结构
|-index.html|-app.js|-style.css
源码
html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>抽奖游戏</title>
<link rel="stylesheet" href="style.css">
</head>
<body ng-app="lottery">
<div ng-controller="ctrl_lottery" id="lottery">
<!--step1 首页-->
<div id="step1">
<a class="start" ng-click=start()>开始</a>
</div>
<!--step2 抽奖列表-->
<div id="step2" class="hide">
<div ng-repeat="item in items" id="{
{item.id}}" class&#