angular.module('ionicApp', ['ionic','flow']) .config(['flowFactoryProvider', function (flowFactoryProvider) { flowFactoryProvider.defaults = { target: 'upload.php', permanentErrors: [404, 500, 501], maxChunkRetries: 1, chunkRetryInterval: 5000, simultaneousUploads: 4, singleFile: false } flowFactoryProvider.on('catchAll', function (event) { console.log('catchAll', arguments); }); }]) .controller('MainCtrl', function($scope) { $scope.settingsList = [ {"TaskId":1, "TaskName":null, "TaskDetails":"Is Rest Room Plate Size is Correct?", "TaskTypeId":1, "QuestionType":2, "CommentEnable":1, "IsCameraEnable":true, "IsCompleted":false, "IsSelectedCheckBox":true, "IsPunch":false, "AttachmentUrl":"/Uploads/1-2014-08-07_01-04-46-PM.jpeg", "Comment":"", "IsDeleted":false }, {"TaskId":10, "TaskName":null, "TaskDetails":"Graphics that do not match size shown inGoBy?", "TaskTypeId":1, "QuestionType":2, "CommentEnable":2, "IsCameraEnable":true, "IsCompleted":true, "IsSelectedCheckBox":false, "IsPunch":false, "AttachmentUrl":"/Uploads/10-2014-08-07_01-04-46-PM.jpeg", "Comment":"", "IsDeleted":false }, {"TaskId":11, "TaskName":null, "TaskDetails":"Do you see any damage to the packaging or graphics?", "TaskTypeId":1, "QuestionType":2, "CommentEnable":1, "IsCameraEnable":true, "IsCompleted":false, "IsSelectedCheckBox":true, "IsPunch":false, "AttachmentUrl":"/Uploads/11-2014-08-13_09-09-53-AM.jpeg", "Comment":"See attachment", "IsDeleted":false }, {"TaskId":13, "TaskName":null, "TaskDetails":"New Punch ", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":14, "TaskName":null, "TaskDetails":"New task ", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":21, "TaskName":null, "TaskDetails":"new punch sat", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":22, "TaskName":null, "TaskDetails":"new punch android", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":23, "TaskName":null, "TaskDetails":"new rtask android sun", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":24, "TaskName":null, "TaskDetails":"new rtask android sun", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":25, "TaskName":null, "TaskDetails":"New punch ipad", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":false, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":26, "TaskName":null, "TaskDetails":"New task as punch", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":27, "TaskName":null, "TaskDetails":"New task as punch 123", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }, {"TaskId":28, "TaskName":null, "TaskDetails":"New punch 2345", "TaskTypeId":1, "QuestionType":1, "CommentEnable":0, "IsCameraEnable":false, "IsCompleted":true, "IsSelectedCheckBox":true, "IsPunch":true, "AttachmentUrl":"", "Comment":"", "IsDeleted":false }]; $scope.pushNotificationChange = function() { console.log('Push Notification Change', $scope.pushNotification.checked); alert($scope.settingsList[0].task); }; $scope.pushNotification = { checked: true }; $scope.emailNotification = 'Subscribed'; }) ;