var app = angular.module("convertModule", ['chieffancypants.loadingBar']); var ConvertController = function ($scope, $http, $log) { $scope.PageUrl; var onError = function (reasone) { $scope.error = "could not featch data"; }; var onFetchComplete = function (response) { }; $scope.ConvertPage = function (PageUrl) { $http.get("http://test.com?save=" + PageUrl) .then(onFetchComplete, onError); }; }; app.controller("ConvertController", ConvertController);
<!doctype html> <html ng-app="convertModule" ng-csp> <head> <meta charset="UTF-8"> <title>test</title> <link href="css/loading-bar.css" rel="stylesheet" /> </head> <body ng-controller="ConvertController"> <form name="convert" ng-submit="ConvertPage(PageUrl)"> <input type="url" placeholder="http://www.url-of-Page.com" class="form-control" ng-model="PageUrl" required /> <div class="form-actions"> <input type="submit" value="convert" class="btn" /> </div> </form> <script src="js/chrome-api-vsdoc.js"></script> <script src="js/vendor/angular.min.js"></script> <script src="js/vendor/angular-route.min.js"></script> <script src="js/loading-bar.js"></script> <script src="popup.js"></script> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)