<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>W3xue教程(w3xue.com)</title>
<link href="https://cdn.bootcss.com/ionic/1.3.2/css/ionic.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/ionic/1.3.2/js/ionic.bundle.min.js"></script>
<script type="text/javascript">
angular.module('ionicApp', ['ionic'])
.controller('RootCtrl', function($scope) {
$scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) {
console.log('Controller changed', oldController, oldIndex, newController, newIndex);
.controller('HomeCtrl', function($scope, $timeout, $ionicModal, $ionicActionSheet) {
$ionicModal.fromTemplateUrl('newTask.html', function(modal) {
$scope.settingsModal = modal;
var removeItem = function(item, button) {
destructiveText: 'Delete Task',
destructiveButtonClicked: function() {
$scope.items.splice($scope.items.indexOf(item), 1);
var completeItem = function(item, button) {
$scope.onReorder = function(el, start, end) {
ionic.Utils.arrayMove($scope.items, start, end);