这是因为此模板现在只支持Visual Studio 2015 RC,但您使用的VS 12.0是VS2013。
[更新]
注:以下内容可以移动到博客或地方可以在未来共享给他人。
环境:
工具:Visual Studio的2013更新为Apache科尔多瓦CTP 3.1
OS 4个+工具:Windows 8.1中的亲
主题:如何制定从离子出发https://github.com/driftyco/ionic-starter-tabs在Visual Studio 2013中的模板
步骤1:
在Visual Studio 2013中创建了一个新的空白Cordova App。
File-> New-> Project-> JavaScript-> Apache Cordova Apps - > Blank App(名为TestIonicTemplate)。
第2步:
从https://github.com/driftyco/ionic-starter-tabs 打开网站http://code.ionicframework.com/#下载的模板。我们稍后会使用它。
第3步:
假设模板文件夹是离子型起动器的选项卡主,而该项目是TestIonicTemplate。然后开始将事情合并到VS项目中。
转到Visual Studio中,添加一个新的文件夹命名模板的 根项目文件夹下。
执行以下操作复制过去:从 将所有.js文件\离子起动器的选项卡主\ JS \到TestIonicTemplate \脚本移动从\离子起动器的选项卡主\模板所有 HTML文件到 TestIonicTemplate \模板
回到VS - >右键点击上面提到的文件夹 - > add->现有的项目。添加这些文件后,我们有以下 结构。
![enter image description here](https://i.stack.imgur.com/4yjYB.jpg)
第4步:
执行以下操作修改VS项目的基础上,我们下载的模板中的index.html中的index.html。
- 添加参考ionic.css和ionic.bundle.js我们可以选择使用 本地副本或离子CDN,你可以得到所有的这些从 http://code.ionicframework.com/#我前面提到的。我在这里使用CDN。
- 删除对index.js的引用并添加对所有.js的引用我们 复制。
- 复制从\离子起动器的选项卡主\ index.html中的元线
- 附加“NG-应用=‘启动器’”在本体和删除缺省HTML 元件体。
- 复制从\离子起动器的选项卡主\ index.html的主体内容现在 我们有以下的index.html代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>TestIonicTemplate</title>
<!-- TestIonicTemplate references -->
<link href="http://code.ionicframework.com/1.0.0/css/ionic.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet" />
<!-- ionic/angularjs js -->
<script src="http://code.ionicframework.com/1.0.0/js/ionic.bundle.js"></script>
</head>
<body ng-app="starter">
<!--
The nav bar that will be updated as we navigate between views.
-->
<ion-nav-bar class="bar-stable">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<!--
The views will be rendered in the <ion-nav-view> directive below
Templates are in the /templates folder (but you could also
have templates inline in this html file if you'd like).
-->
<ion-nav-view></ion-nav-view>
<!-- Cordova reference, this is added to your app when it's built. -->
<script src="cordova.js"></script>
<script src="scripts/platformOverrides.js"></script>
<script src="scripts/app.js"></script>
<script src="scripts/controllers.js"></script>
<script src="scripts/services.js"></script>
</body>
</html>
这里是结果我在纹波看到:
![enter image description here](https://i.stack.imgur.com/CiNlf.jpg)
我正在使用VS 2013社区。难道它不支持[科尔多瓦](http://blogs.msdn。COM/B/somasegar /存档/ 2014/05/12 /移动第一云先发展-视觉工作室Apache的科尔多瓦-工装和 - 云优化的净futures.aspx)? – xameeramir
VS 2013确实支持科尔多瓦。但你提到的模板不支持VS 2013.让我给你一些关于如何在以后创建离子cordova应用程序的步骤。我现在没有开发环境。 –
检查我的更新。 –