JS can call Android and get a value back!

This commit is contained in:
Bradlee Speice
2014-09-01 14:32:13 -04:00
parent e20e42b7bd
commit ae43667f2f
4 changed files with 15 additions and 0 deletions

View File

@ -31,6 +31,8 @@ window.appendVerse = function(text) {
return scope.$apply();
};
console.log(Android.testReturn("Good morning."));
/*
Future reference: Get the controller scope like so:

View File

@ -23,6 +23,8 @@ window.appendVerse = (text) ->
# Since we're calling outside of angular, we need to manually apply
scope.$apply()
console.log Android.testReturn "Good morning."
###
Future reference: Get the controller scope like so:
angular.element($("<controller-element>")).scope().<function>