javascript - Invoke Angular JS code/method from ios code -


i know how access normal javascript code/methods using javascriptcore.h/webview in ios. able access below mentioned angular js code ios via webview.

<html>     <head>             <script src="./angular.min.js"></script>             <script type="text/javascript">              var app = angular.module('app', []);               app.controller("ctlr", function($scope,$http){                 $scope.makereq = function(){                     $http.get("https://api.github.com/").then(function(response){                                 alert(response.data);                         });                     }             });             </script>     </head>     <body ng-app="app" class="ng-scope">         <div ng-controller="ctlr"/>     </body> </html> 

what trying achieve accessing angular.js code without html ios. in simple words, have js file have angular code , call ios. possible ?

javascriptcore seems best solution you. why don't use it?


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -