我正在使用cordova构建混合应用程序。我的文件夹结构看起来像
WWW
的index.html
当我使用cordova( cordova build )构建项目时,当我运行 cordova服务时 javascripts文件从根路径提供 Javascript从相对路径获取,而css完全加载
请帮我解决这个问题。但是当我从cordova运行演示项目时,这不是问题。
这是索引文件。它的缩小版本
<!doctype html> <html class="no-js"> <head> <meta charset="utf-8"> <title>KnoTalk</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.460a10c2.css"> <link rel="stylesheet" href="styles/main.b59cb9a9.css"> <link rel="shortcut icon" type="image/png" href="images/favicon.fcf321eb.png"> <base href="/"> <body ng-app="knotalk"> <div class="sidebar sidebar-left"> <div ng-include="'components/sidebar/sidebar.html'"></div> </div> <div class="sidebar sidebar-right"> <div ng-controller="MainController"> <div ng-if="isChannel"> <div ng-include="'components/middleSection/channelMetaInfo.html'"></div> </div> <div ng-if="!isChannel"> <div ng-include="'components/middleSection/userMetaInfo.html'"></div> </div> </div> </div> <div class="app" ng-swipe-right="Ui.turnOn("uiSidebarLeft")" ng-swipe-left="Ui.turnOff("uiSidebarLeft")"> <!-- Add your site or application content here --> <!-- angular spinner --> <span us-spinner spinner-key="spinner-1"></span> <div ng-include="src='components/header/header.html'"></div> <div class="app-body"> <div class="app-content"> <div ng-view=""></div> </div> </div> </div> <div ui-yield-to="modals"></div> <!--[if lt IE 9]>
<script src="scripts/oldieshim.fa8ddb71.js"></script>
<![endif]--> <script type="text/javascript" src="cordova.js"></script><script type="text/javascript" href="scripts/vendor.1a204611.js"></script> <script href="scripts/scripts.79913f18.js" type="text/javascript"></script>
&#13;
`