diff --git a/demos/storage/index.ts b/demos/storage/index.ts deleted file mode 100644 index bec284a785..0000000000 --- a/demos/storage/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import {Component} from 'angular2/core'; -import {Control, ControlGroup} from 'angular2/common'; - -import {App, Storage, LocalStorage, SqlStorage} from 'ionic/ionic'; - -let testUrl = 'https://ionic-api-tester.herokuapp.com/json'; -let testUrl404 = 'https://ionic-api-tester.herokuapp.com/404'; - - -@App({ - templateUrl: 'main.html' -}) -class IonicApp { - constructor() { - this.local = new Storage(LocalStorage); - this.sql = new Storage(SqlStorage); - } - getLocal() { - this.local.get('name').then(value => { - alert('Your name is: ' + value); - }); - } - setLocal() { - let name = prompt('Your name?'); - - this.local.set('name', name); - } - removeLocal() { - this.local.remove('name'); - } - - getSql() { - this.sql.get('name').then(value => { - alert('Your name is: ' + value); - }, (errResult) => { - console.error('Unable to get item from SQL db:', errResult); - }); - } - setSql() { - let name = prompt('Your name?'); - - this.sql.set('name', name); - } - removeSql() { - this.sql.remove('name'); - } -} diff --git a/demos/storage/main.html b/demos/storage/main.html deleted file mode 100644 index 8e4111657c..0000000000 --- a/demos/storage/main.html +++ /dev/null @@ -1,13 +0,0 @@ - - -

Local Storage

- - - - -

SQL Storage

- - - -
-
diff --git a/demos/tap/index.ts b/demos/tap/index.ts deleted file mode 100644 index 683bf1bc13..0000000000 --- a/demos/tap/index.ts +++ /dev/null @@ -1,102 +0,0 @@ -import {App} from 'ionic/ionic'; - - -@App({ - templateUrl: 'main.html' -}) -class E2EApp { - - tapTest(eleType) { - console.debug('test click', eleType); - } - -} - - -function onEvent(ev) { - var c = pointerCoord(ev); - var l = '(' + c.x + ',' + c.y + ')'; - if (ev.isIonicTap) { - l += ' isIonicTap'; - } - console.debug(ev.type, l); -} - -function pointerCoord(ev) { - // get coordinates for either a mouse click - // or a touch depending on the given event - let c = { x: 0, y: 0 }; - if (ev) { - const touches = ev.touches && ev.touches.length ? ev.touches : [ev]; - const e = (ev.changedTouches && ev.changedTouches[0]) || touches[0]; - if (e) { - c.x = e.clientX || e.pageX || 0; - c.y = e.clientY || e.pageY || 0; - } - } - return c; -} - -document.addEventListener('touchstart', onEvent); -document.addEventListener('touchcancel', onEvent); -document.addEventListener('touchend', onEvent); -document.addEventListener('mousedown', onEvent); -document.addEventListener('mouseup', onEvent); -document.addEventListener('click', onEvent); - - -var msgs = []; -var index = 0; -var timeId; -var winConsoleError = console.error; - -console.error = function() { - winConsoleError.apply(this, arguments); - var args = ['ERROR!']; - for (var i = 0, j = arguments.length; i < j; i++){ - args.push(arguments[i]); - } - console.debug.apply(this, args); -}; - -console.debug = function() { - index++; - var msg = []; - msg.push(index); - for (var i = 0, j = arguments.length; i < j; i++){ - msg.push(arguments[i]); - } - msg.push(getTime()); - - msg = msg.join(', '); - - if(arguments[0] === 'ERROR!') msg = '' + msg + ''; - - if(arguments[0] === 'touchstart') msg = '' + msg + ''; - if(arguments[0] === 'touchend') msg = '' + msg + ''; - - if(arguments[0] === 'mousedown') msg = '' + msg + ''; - if(arguments[0] === 'mouseup') msg = '' + msg + ''; - - if(arguments[0] === 'click') msg = '' + msg + ''; - - if(arguments[0] === 'test click') msg = '' + msg + ''; - - msgs.unshift( msg ); - - if(msgs.length > 25) { - msgs.splice(25); - } - - // do this so we try not to interfere with the device performance - clearTimeout(timeId); - timeId = setTimeout(function(){ - document.getElementById('logs').innerHTML = msgs.join('
'); - }, 100); - -} - -function getTime() { - var d = new Date(); - return d.getSeconds() + '.' + d.getMilliseconds(); -} diff --git a/demos/tap/main.html b/demos/tap/main.html deleted file mode 100644 index 966e129584..0000000000 --- a/demos/tap/main.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - Link - - - - - - - - -
- Div w/ (click) -
-
- - -
- Div w/out (click) -
-
- -
- - -
- -