@owstack/ows-wallet-applet-hello
Version:
An OWS Wallet minimal applet plugin.
1 lines • 1.4 kB
JavaScript
"use strict";angular.module("owsWalletPlugin",["gettext","ionic","ngLodash","owsWalletPluginClient","owsWalletPlugin.api.hello","owsWalletPlugin.controllers","owsWalletPlugin.services"]),angular.module("owsWalletPlugin.controllers",[]),angular.module("owsWalletPlugin.services",[]),angular.module("owsWalletPlugin").config(["$stateProvider",function($stateProvider){$stateProvider.state("home",{url:"/home",controller:"HomeCtrl",templateUrl:"views/home/home.html"})}]).run(["$rootScope","$log","$state",function($rootScope,$log,$state){owswallet.Plugin.ready(function(){$state.go("home")}),$rootScope.$on("$stateChangeStart",function(event,toState,toParams,fromState,fromParams){$log.debug("Applet route change start from:",fromState.name||"-"," to:",toState.name)})}]),angular.module("owsWalletPlugin").run(["gettextCatalog",function(gettextCatalog){}]),angular.module("owsWalletPlugin.controllers").controller("HomeCtrl",["$scope","owsWalletPlugin.api.hello.Hello","owsWalletPlugin.api.hello.HelloServlet","owsWalletPluginClient.api.Session",function($scope,Hello,HelloServlet,Session){var hello=new Hello;owswallet.Plugin.openForBusiness(HelloServlet.id,function(){hello.say("Hello, World!").then(function(response){$scope.result=response,$scope.$apply()}).catch(function(error){})}),$scope.$on("$ionicView.beforeEnter",function(event,data){$scope.title=Session.getInstance().plugin.header.name})}]);