我无法启动并运行新的Angular项目

时间:2016-04-17 02:59:15

标签: javascript angularjs

我的HTML看起来像这样:

            <html ng-app="myApp" ng-controller="myController">
                <head>
                    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
                </head>
                <body>
                    ******{{randomValue}}*******
                </body>
            </html>

我的Javascript看起来像这样:

            var myApp = angular.module('myApp', [
                'ui.bootstrap',
                'ngSanitize'
            ]);

            myApp.config(['$stateProvide', '$httpProvider', function config($stateProvider, $httpProvider) {

            }]);

            myApp.run(['$location', '$timeout', '$rootScope', function($location, $timeout, $rootScope) {

            }]);

            myApp.controller('myController', ['$scope', '$rootScope', function($scope, $rootScope) {

                $scope.randomValue = "Hello World!";

            }]);

我在浏览器控制台中收到一个角度错误,导致我Angular Website

0 个答案:

没有答案