0

I have a html file running with angular service. I am getting output on html file currently. I have another php file at the same path and I need to get the output to the php file.

index.html

<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-services-usage-production</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script>
<script src="script.js"></script>

</head>
<body ng-app="myServiceModule">
    <div id="simple" ng-controller="MyController">
        <p>Let's try this simple notify service, injected into the controller...</p>
         <input ng-init="message='test'" ng-model="message" >
         <button ng-click="callNotify(message);">NOTIFY</button>
         <p>(you have to click 3 times to see an alert)</p>
    </div>
</body>
</html>

script.js

(function(angular) {
  'use strict';
angular.
 module('myServiceModule', []).
  controller('MyController', ['$scope', 'notify', function($scope, notify) {
    $scope.callNotify = function(msg) {
      notify(msg);
    };
  }]).
 factory('notify', ['$window', function(win) {
    var msgs = [];
    return function(msg) {
      msgs.push(msg);
      if (msgs.length === 3) {
         win.alert(msgs.join('\n'));
        msgs = [];
      }
    };
  }]);
})(window.angular);

I have php file called out.blade.php. I need to get the html output to the php file. How can I do that?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Dean Johns
  • 498
  • 4
  • 28
  • Provide more details with sample code. – nirazlatu Aug 10 '18 at 09:46
  • This question is too broad to re-open. What research have you done? It looks like you have just given us a program stub and you want us to write the code for you. [From review](https://stackoverflow.com/review/reopen/20572076) – georgeawg Aug 13 '18 at 08:53

0 Answers0