diff --git a/ionic/components/alert/alert.js b/ionic/components/alert/alert.js
index d5477a5db5..3d55bcb1d7 100644
--- a/ionic/components/alert/alert.js
+++ b/ionic/components/alert/alert.js
@@ -2,33 +2,39 @@
// import {IonicComponent} from 'ionic/config/component'
-// @Component({
-// selector: 'ion-alert'
-// })
-// @View({
-// template: `
-//
-//
-//
-//
-//
-// Seriously, who does not like cookies.
-//
-//
-//
-//
-//
-//
`
-// })
-// export class Alert {
-// constructor(
-// @NgElement() ngElement:NgElement
-// ) {
-// this.domElement = ngElement.domElement
-// this.config = Alert.config.invoke(this)
-// }
-// }
+/*
+@Component({
+ selector: 'ion-alert'
+})
+@NgView({
+ template: `
+
+
+
+
+
+ Seriously, who does not like cookies.
+
+
+
+
+
+
`
+})
+export class Alert {
+ constructor(
+ @NgElement() ngElement:NgElement
+ ) {
+ this.domElement = ngElement.domElement
+ this.config = Alert.config.invoke(this)
+ }
+
+ static open(opts) {
+ let alert = new Alert();
+ }
+}
+*/
// new IonicComponent(Alert, {})
diff --git a/ionic/components/alert/test/basic/main.html b/ionic/components/alert/test/basic/main.html
index b7ec13fdde..b0d903c9b2 100644
--- a/ionic/components/alert/test/basic/main.html
+++ b/ionic/components/alert/test/basic/main.html
@@ -1,4 +1,8 @@
+
+
+
+
diff --git a/ionic/components/alert/test/basic/main.js b/ionic/components/alert/test/basic/main.js
index 5451f02497..87d1337ce9 100644
--- a/ionic/components/alert/test/basic/main.js
+++ b/ionic/components/alert/test/basic/main.js
@@ -11,6 +11,12 @@ class IonicApp {
constructor() {
console.log('IonicApp Start')
}
+ showAlert() {
+ console.log('Show alert');
+
+ Alert.open({
+ });
+ }
}
bootstrap(IonicApp)
diff --git a/ionic/components/app/test/hn/firebase-debug.js b/ionic/components/app/test/hn/firebase-debug.js
new file mode 100644
index 0000000000..f3b7c8dde5
--- /dev/null
+++ b/ionic/components/app/test/hn/firebase-debug.js
@@ -0,0 +1,13050 @@
+/*! @license Firebase v2.2.4
+ License: https://www.firebase.com/terms/terms-of-service.html */
+var CLOSURE_NO_DEPS = true;
+var COMPILED = false;
+var goog = goog || {};
+goog.global = this;
+goog.global.CLOSURE_UNCOMPILED_DEFINES;
+goog.global.CLOSURE_DEFINES;
+goog.isDef = function(val) {
+ return val !== void 0;
+};
+goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
+ var parts = name.split(".");
+ var cur = opt_objectToExportTo || goog.global;
+ if (!(parts[0] in cur) && cur.execScript) {
+ cur.execScript("var " + parts[0]);
+ }
+ for (var part;parts.length && (part = parts.shift());) {
+ if (!parts.length && goog.isDef(opt_object)) {
+ cur[part] = opt_object;
+ } else {
+ if (cur[part]) {
+ cur = cur[part];
+ } else {
+ cur = cur[part] = {};
+ }
+ }
+ }
+};
+goog.define = function(name, defaultValue) {
+ var value = defaultValue;
+ if (!COMPILED) {
+ if (goog.global.CLOSURE_UNCOMPILED_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES, name)) {
+ value = goog.global.CLOSURE_UNCOMPILED_DEFINES[name];
+ } else {
+ if (goog.global.CLOSURE_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES, name)) {
+ value = goog.global.CLOSURE_DEFINES[name];
+ }
+ }
+ }
+ goog.exportPath_(name, value);
+};
+goog.define("goog.DEBUG", true);
+goog.define("goog.LOCALE", "en");
+goog.define("goog.TRUSTED_SITE", true);
+goog.define("goog.STRICT_MODE_COMPATIBLE", false);
+goog.define("goog.DISALLOW_TEST_ONLY_CODE", COMPILED && !goog.DEBUG);
+goog.provide = function(name) {
+ if (!COMPILED) {
+ if (goog.isProvided_(name)) {
+ throw Error('Namespace "' + name + '" already declared.');
+ }
+ }
+ goog.constructNamespace_(name);
+};
+goog.constructNamespace_ = function(name, opt_obj) {
+ if (!COMPILED) {
+ delete goog.implicitNamespaces_[name];
+ var namespace = name;
+ while (namespace = namespace.substring(0, namespace.lastIndexOf("."))) {
+ if (goog.getObjectByName(namespace)) {
+ break;
+ }
+ goog.implicitNamespaces_[namespace] = true;
+ }
+ }
+ goog.exportPath_(name, opt_obj);
+};
+goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
+goog.module = function(name) {
+ if (!goog.isString(name) || !name || name.search(goog.VALID_MODULE_RE_) == -1) {
+ throw Error("Invalid module identifier");
+ }
+ if (!goog.isInModuleLoader_()) {
+ throw Error("Module " + name + " has been loaded incorrectly.");
+ }
+ if (goog.moduleLoaderState_.moduleName) {
+ throw Error("goog.module may only be called once per module.");
+ }
+ goog.moduleLoaderState_.moduleName = name;
+ if (!COMPILED) {
+ if (goog.isProvided_(name)) {
+ throw Error('Namespace "' + name + '" already declared.');
+ }
+ delete goog.implicitNamespaces_[name];
+ }
+};
+goog.module.get = function(name) {
+ return goog.module.getInternal_(name);
+};
+goog.module.getInternal_ = function(name) {
+ if (!COMPILED) {
+ if (goog.isProvided_(name)) {
+ return name in goog.loadedModules_ ? goog.loadedModules_[name] : goog.getObjectByName(name);
+ } else {
+ return null;
+ }
+ }
+};
+goog.moduleLoaderState_ = null;
+goog.isInModuleLoader_ = function() {
+ return goog.moduleLoaderState_ != null;
+};
+goog.module.declareTestMethods = function() {
+ if (!goog.isInModuleLoader_()) {
+ throw new Error("goog.module.declareTestMethods must be called from " + "within a goog.module");
+ }
+ goog.moduleLoaderState_.declareTestMethods = true;
+};
+goog.module.declareLegacyNamespace = function() {
+ if (!COMPILED && !goog.isInModuleLoader_()) {
+ throw new Error("goog.module.declareLegacyNamespace must be called from " + "within a goog.module");
+ }
+ if (!COMPILED && !goog.moduleLoaderState_.moduleName) {
+ throw Error("goog.module must be called prior to " + "goog.module.declareLegacyNamespace.");
+ }
+ goog.moduleLoaderState_.declareLegacyNamespace = true;
+};
+goog.setTestOnly = function(opt_message) {
+ if (goog.DISALLOW_TEST_ONLY_CODE) {
+ opt_message = opt_message || "";
+ throw Error("Importing test-only code into non-debug environment" + (opt_message ? ": " + opt_message : "."));
+ }
+};
+goog.forwardDeclare = function(name) {
+};
+if (!COMPILED) {
+ goog.isProvided_ = function(name) {
+ return name in goog.loadedModules_ || !goog.implicitNamespaces_[name] && goog.isDefAndNotNull(goog.getObjectByName(name));
+ };
+ goog.implicitNamespaces_ = {"goog.module":true};
+}
+goog.getObjectByName = function(name, opt_obj) {
+ var parts = name.split(".");
+ var cur = opt_obj || goog.global;
+ for (var part;part = parts.shift();) {
+ if (goog.isDefAndNotNull(cur[part])) {
+ cur = cur[part];
+ } else {
+ return null;
+ }
+ }
+ return cur;
+};
+goog.globalize = function(obj, opt_global) {
+ var global = opt_global || goog.global;
+ for (var x in obj) {
+ global[x] = obj[x];
+ }
+};
+goog.addDependency = function(relPath, provides, requires, opt_isModule) {
+ if (goog.DEPENDENCIES_ENABLED) {
+ var provide, require;
+ var path = relPath.replace(/\\/g, "/");
+ var deps = goog.dependencies_;
+ for (var i = 0;provide = provides[i];i++) {
+ deps.nameToPath[provide] = path;
+ deps.pathIsModule[path] = !!opt_isModule;
+ }
+ for (var j = 0;require = requires[j];j++) {
+ if (!(path in deps.requires)) {
+ deps.requires[path] = {};
+ }
+ deps.requires[path][require] = true;
+ }
+ }
+};
+goog.define("goog.ENABLE_DEBUG_LOADER", true);
+goog.logToConsole_ = function(msg) {
+ if (goog.global.console) {
+ goog.global.console["error"](msg);
+ }
+};
+goog.require = function(name) {
+ if (!COMPILED) {
+ if (goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_) {
+ goog.maybeProcessDeferredDep_(name);
+ }
+ if (goog.isProvided_(name)) {
+ if (goog.isInModuleLoader_()) {
+ return goog.module.getInternal_(name);
+ } else {
+ return null;
+ }
+ }
+ if (goog.ENABLE_DEBUG_LOADER) {
+ var path = goog.getPathFromDeps_(name);
+ if (path) {
+ goog.included_[path] = true;
+ goog.writeScripts_();
+ return null;
+ }
+ }
+ var errorMessage = "goog.require could not find: " + name;
+ goog.logToConsole_(errorMessage);
+ throw Error(errorMessage);
+ }
+};
+goog.basePath = "";
+goog.global.CLOSURE_BASE_PATH;
+goog.global.CLOSURE_NO_DEPS;
+goog.global.CLOSURE_IMPORT_SCRIPT;
+goog.nullFunction = function() {
+};
+goog.identityFunction = function(opt_returnValue, var_args) {
+ return opt_returnValue;
+};
+goog.abstractMethod = function() {
+ throw Error("unimplemented abstract method");
+};
+goog.addSingletonGetter = function(ctor) {
+ ctor.getInstance = function() {
+ if (ctor.instance_) {
+ return ctor.instance_;
+ }
+ if (goog.DEBUG) {
+ goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor;
+ }
+ return ctor.instance_ = new ctor;
+ };
+};
+goog.instantiatedSingletons_ = [];
+goog.define("goog.LOAD_MODULE_USING_EVAL", true);
+goog.define("goog.SEAL_MODULE_EXPORTS", goog.DEBUG);
+goog.loadedModules_ = {};
+goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
+if (goog.DEPENDENCIES_ENABLED) {
+ goog.included_ = {};
+ goog.dependencies_ = {pathIsModule:{}, nameToPath:{}, requires:{}, visited:{}, written:{}, deferred:{}};
+ goog.inHtmlDocument_ = function() {
+ var doc = goog.global.document;
+ return typeof doc != "undefined" && "write" in doc;
+ };
+ goog.findBasePath_ = function() {
+ if (goog.global.CLOSURE_BASE_PATH) {
+ goog.basePath = goog.global.CLOSURE_BASE_PATH;
+ return;
+ } else {
+ if (!goog.inHtmlDocument_()) {
+ return;
+ }
+ }
+ var doc = goog.global.document;
+ var scripts = doc.getElementsByTagName("script");
+ for (var i = scripts.length - 1;i >= 0;--i) {
+ var script = (scripts[i]);
+ var src = script.src;
+ var qmark = src.lastIndexOf("?");
+ var l = qmark == -1 ? src.length : qmark;
+ if (src.substr(l - 7, 7) == "base.js") {
+ goog.basePath = src.substr(0, l - 7);
+ return;
+ }
+ }
+ };
+ goog.importScript_ = function(src, opt_sourceText) {
+ var importScript = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
+ if (importScript(src, opt_sourceText)) {
+ goog.dependencies_.written[src] = true;
+ }
+ };
+ goog.IS_OLD_IE_ = !goog.global.atob && goog.global.document && goog.global.document.all;
+ goog.importModule_ = function(src) {
+ var bootstrap = 'goog.retrieveAndExecModule_("' + src + '");';
+ if (goog.importScript_("", bootstrap)) {
+ goog.dependencies_.written[src] = true;
+ }
+ };
+ goog.queuedModules_ = [];
+ goog.wrapModule_ = function(srcUrl, scriptText) {
+ if (!goog.LOAD_MODULE_USING_EVAL || !goog.isDef(goog.global.JSON)) {
+ return "" + "goog.loadModule(function(exports) {" + '"use strict";' + scriptText + "\n" + ";return exports" + "});" + "\n//# sourceURL=" + srcUrl + "\n";
+ } else {
+ return "" + "goog.loadModule(" + goog.global.JSON.stringify(scriptText + "\n//# sourceURL=" + srcUrl + "\n") + ");";
+ }
+ };
+ goog.loadQueuedModules_ = function() {
+ var count = goog.queuedModules_.length;
+ if (count > 0) {
+ var queue = goog.queuedModules_;
+ goog.queuedModules_ = [];
+ for (var i = 0;i < count;i++) {
+ var path = queue[i];
+ goog.maybeProcessDeferredPath_(path);
+ }
+ }
+ };
+ goog.maybeProcessDeferredDep_ = function(name) {
+ if (goog.isDeferredModule_(name) && goog.allDepsAreAvailable_(name)) {
+ var path = goog.getPathFromDeps_(name);
+ goog.maybeProcessDeferredPath_(goog.basePath + path);
+ }
+ };
+ goog.isDeferredModule_ = function(name) {
+ var path = goog.getPathFromDeps_(name);
+ if (path && goog.dependencies_.pathIsModule[path]) {
+ var abspath = goog.basePath + path;
+ return abspath in goog.dependencies_.deferred;
+ }
+ return false;
+ };
+ goog.allDepsAreAvailable_ = function(name) {
+ var path = goog.getPathFromDeps_(name);
+ if (path && path in goog.dependencies_.requires) {
+ for (var requireName in goog.dependencies_.requires[path]) {
+ if (!goog.isProvided_(requireName) && !goog.isDeferredModule_(requireName)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ };
+ goog.maybeProcessDeferredPath_ = function(abspath) {
+ if (abspath in goog.dependencies_.deferred) {
+ var src = goog.dependencies_.deferred[abspath];
+ delete goog.dependencies_.deferred[abspath];
+ goog.globalEval(src);
+ }
+ };
+ goog.loadModule = function(moduleDef) {
+ var previousState = goog.moduleLoaderState_;
+ try {
+ goog.moduleLoaderState_ = {moduleName:undefined, declareTestMethods:false};
+ var exports;
+ if (goog.isFunction(moduleDef)) {
+ exports = moduleDef.call(goog.global, {});
+ } else {
+ if (goog.isString(moduleDef)) {
+ exports = goog.loadModuleFromSource_.call(goog.global, moduleDef);
+ } else {
+ throw Error("Invalid module definition");
+ }
+ }
+ var moduleName = goog.moduleLoaderState_.moduleName;
+ if (!goog.isString(moduleName) || !moduleName) {
+ throw Error('Invalid module name "' + moduleName + '"');
+ }
+ if (goog.moduleLoaderState_.declareLegacyNamespace) {
+ goog.constructNamespace_(moduleName, exports);
+ } else {
+ if (goog.SEAL_MODULE_EXPORTS && Object.seal) {
+ Object.seal(exports);
+ }
+ }
+ goog.loadedModules_[moduleName] = exports;
+ if (goog.moduleLoaderState_.declareTestMethods) {
+ for (var entry in exports) {
+ if (entry.indexOf("test", 0) === 0 || entry == "tearDown" || entry == "setUp" || entry == "setUpPage" || entry == "tearDownPage") {
+ goog.global[entry] = exports[entry];
+ }
+ }
+ }
+ } finally {
+ goog.moduleLoaderState_ = previousState;
+ }
+ };
+ goog.loadModuleFromSource_ = function(source) {
+ var exports = {};
+ eval(arguments[0]);
+ return exports;
+ };
+ goog.writeScriptTag_ = function(src, opt_sourceText) {
+ if (goog.inHtmlDocument_()) {
+ var doc = goog.global.document;
+ if (doc.readyState == "complete") {
+ var isDeps = /\bdeps.js$/.test(src);
+ if (isDeps) {
+ return false;
+ } else {
+ throw Error('Cannot write "' + src + '" after document load');
+ }
+ }
+ var isOldIE = goog.IS_OLD_IE_;
+ if (opt_sourceText === undefined) {
+ if (!isOldIE) {
+ doc.write('
+
diff --git a/ionic/components/app/test/hn/pages/top.js b/ionic/components/app/test/hn/pages/top.js
index 0304dd81c7..354390d3f1 100644
--- a/ionic/components/app/test/hn/pages/top.js
+++ b/ionic/components/app/test/hn/pages/top.js
@@ -32,57 +32,45 @@ export class HNTopStories {
url: "http://minusbat.livejournal.com/180556.html"
}];
- var APIUrl = 'https://hacker-news.firebaseio.com/v0';
+ var APIUrl = 'https://hacker-news.firebaseio.com/v0';
+ this.fb = new window.Firebase(APIUrl);
- var s = document.createElement('script');
- s.src = 'https://cdn.firebase.com/js/client/2.2.4/firebase.js';
- s.async = true;
- s.onload = doStuff.bind(this);
- document.head.appendChild(s);
- console.log('loading firebase');
+ this.fb = new window.Firebase(APIUrl);
+ this.fb.child('topstories').limitToFirst(20).once('value', (snapshot) => {
- function doStuff() {
- console.log('done loading firebase');
+ let items = snapshot.val();
- this.fb = new window.Firebase(APIUrl);
- this.fb.child('topstories').limitToFirst(20).once('value', (snapshot) => {
+ console.log('Fetched', items.length, 'items');
- let items = snapshot.val();
+ for(var itemID of items) {
- console.log('Fetched', items.length, 'items');
- debugger;
-
- for(var itemID of items) {
-
- this.fb.child("item").child(itemID).on('value', (data) => {
- //setTimeout(() => {
- //console.log('SUB THIS', this);
- //console.log(itemID, data.val());
- //console.log('ADDED');
- //self.stories.push(data.val());
- //throw new Error("stack test");
- debugger;
- console.log('GOT ITEM', data.val());
- self.stories.push({title: 'asdf'});
- //});
-
- //console.log(data.val());
- });
- }
- });
+ this.fb.child("item").child(itemID).on('value', (data) => {
+ //setTimeout(() => {
+ //console.log('SUB THIS', this);
+ //console.log(itemID, data.val());
+ //console.log('ADDED');
+ //self.stories.push(data.val());
+ //throw new Error("stack test");
+ debugger;
+ console.log('GOT ITEM', data.val());
+ self.stories.push({title: 'asdf'});
+ //});
+ //console.log(data.val());
+ });
+ }
+ });
//doStuffEnd
}
- /*
- HackerNews.getTopStories((val) => {
- new Promise((resolve, reject) => {
- console.log('PROMISES!', val);
- this.stories.push(val);
- resolve();
- });
+ /*
+ HackerNews.getTopStories((val) => {
+ new Promise((resolve, reject) => {
+ console.log('PROMISES!', val);
+ this.stories.push(val);
+ resolve();
});
- */
- }
+ });
+ */
}
diff --git a/scripts/e2e/index.template.html b/scripts/e2e/index.template.html
index c4a4115a68..db0fe436b2 100644
--- a/scripts/e2e/index.template.html
+++ b/scripts/e2e/index.template.html
@@ -20,7 +20,7 @@