mirror of
https://github.com/MinimalBible/MinimalBible
synced 2026-06-11 15:52:06 -04:00
JS can call Android and get a value back!
This commit is contained in:
+2
@@ -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:
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user