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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -