Angular.js how to move the service in a separate .js file
问题 Using the examples from their documentation I did this .html file: <html> <head> <title>Angular JS Services</title> <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> <script src="test.js"></script> </head> <body> <h2>AngularJS Sample Application</h2> <div ng-app = "mainApp" ng-controller = "VehicleInfo"> <p>Enter a number: <input type = "number" ng-model = "number" /></p> <button ng-click = "getNameOfVclass()">X<sup>2</sup></button> <p>Result: {