/* global nw, angular, console, require, Peer, StellarSdk */

angular.module('app', [
	'ngRoute',
	'ionic'
])
.run(function ($rootScope, $window) {
	'use strict';
	$rootScope.goBack = function() {
		$window.history.back();
	};
})
.run(function (platformInfo) {
	'use strict';

	if (platformInfo.isNW) {

//		nw.Window.get().showDevTools();

		// Load native UI library
		var gui = require('nw.gui');

		// Create menu
		var menu = new gui.Menu({
			type: 'menubar'
		});

		// Append Menu to Window
		gui.Window.get().menu = menu;

		// create MacBuiltin
		try {
			menu.createMacBuiltin('Sample App', {
				hideEdit: false,
				hideWindow: true
			});
		} catch (e) {}
	}
});

@@ -101,16 +101,168 @@
 ionic'%0A%5D
+, function ($compileProvider) %7B%0A%09'use strict';%0A%09$compileProvider.aHrefSanitizationWhitelist(/%5E%5Cs*((https?%7Cftp%7Cmailto%7Cfile%7Cchrome-extension%7Ctel):)%7C#/);%0A%7D
 )%0A.run(f

Update to the latest nwjs version, fix dynamic links