我的角度应用程序在本地工作(仅限html),但在部署到服务器上后失败。没有控制台错误。没有404错误。基本上......用户界面无法呈现。 batarang扩展说"模块已创建但从未加载" ...但是当我在localhost上运行我的应用程序时,它并没有在Batarang中显示该消息。
我已经研究了该问题的其他类似问题,但没有一个解决方案符合我的问题,它只适用于localhost而不是服务器......
var ll_app = angular.module("liveLetter", []);
ll_app.service("ExportService", function()
{
this.export = function(format)
{
//code
};
});
ll_app.controller("MenuController", ["$scope", "$rootScope", "$sce", "ExportService", function($scope, $rootScope, $sce, ExportService)
{
//code
}]);
ll_app.controller("DraftController", ["$scope", "$rootScope", function($scope, $rootScope)
{
//code
}]);
HTML ...
<!DOCTYPE html>
<html>
<head>
<title>
Live Letter
</title>
<link href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="./css/bootstrap-dialog.min.css" />
<link rel="stylesheet" type="text/css" href="./css/app.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="./js/app_kwikies.js"></script>
<script src="./js/angular/angular.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="./js/bootstrap-dialog.min.js"></script>
<script src="./js/app.js"></script>
</head>
<body ng-app="liveLetter">
<div id="main_nav" ng-controller="MenuController" ng-class="loading ? 'default' : 'half_width'">
<p id="header_txt">{{ shuffled_text }}</p>
<div id="menu_buttons" ng-show="!loading">
<div class="menu_icon" ng-repeat="icon in icons">
<span class="symbola" ng-bind-html="icon.html" title="{{icon.title}}" ng-class="active_key === icon.key ? 'active_icon' : 'default_icon'" ng-click="icon.click_fn($event)"></span>
</div>
</div>
<span id="email" ng-show="!loading">rnirnber@gmail.com</span>
</div>
<div ng-controller="DraftController">
<div id="editor" ng-if="editable" contenteditable="true" ng-style="text_color_css">
{{content}}
</div>
<div id="rgb_inputs" ng-if="editable" style="display: block">
<input value="{{red}}" ng-blur="update_rgb(0, $event)" type="number" step="5" min="0" max="255" />
<input value="{{green}}" ng-blur="update_rgb(1, $event)" type="number" step="5" min="0" max="255"/>
<input value="{{blue}}" ng-blur="update_rgb(2, $event)" type="number" step="5" min="0" max="255" />
</div>
</div>
</body>
</html>