- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
似乎 win-pivot angular 指令不会在 Windows Phone 8.1 JavaScript 应用程序上呈现实际的枢轴或枢轴项。我正在使用以下设置。除了使用新的 JavaScript Pivot App 项目创建的默认代码之外,我还在 default.html 文件中添加了以下指令。
从以下代码中,只有左右枢轴标题正在呈现(没有样式)。我已将旧 CSS 文件 (WinJS 2.1) 中的其他引用移至最新版本。
设置
<div>
<win-pivot>
<win-pivot-left-header>Custom Left Header</win-pivot-left-header>
<win-pivot-item header="'First'">
Pivots are useful for varied content
</win-pivot-item>
<win-pivot-item header="'Second'">
This Pivot is boring however, it just has things like data bindings: {{ratings.length}}
</win-pivot-item>
<win-pivot-item header="'Tail...'">
Because it's only purpose is to show how to create a Pivot
</win-pivot-item>
<win-pivot-right-header>Custom Right Header</win-pivot-right-header>
</win-pivot>
</div>
var ang = angular.module('app', ['winjs']);
ang.directive('app.testdir', ['$filter', function ($filter) {
return {
restrict: "AE",
replace: true,
templateUrl: "/scripts/app.html",
scope: {
},
controller: ["$scope", Controller],
};
function Controller($scope) {
}
}]);
<body class="phone">
<div>
<div app.testdir></div>
</div>
<div id="contenthost" data-win-control="Application.PageControlNavigator" data-win-options="{home: '/pages/hub/hub.html'}"></div>
</body>
最佳答案
angular-winjs 中存在一个错误
我也遇到了同样的问题,发现 PivotItem 没有呈现。
我在 angular-winjs.js ( 3.1 ) 中更改了以下行
exists("PivotItem") && module.directive("winPivotItem", function () {
exists("Pivot") && module.directive("winPivotItem", function () {
<win-pivot>
<win-pivot-item ng-repeat="item_pivot in app.items" header="item_pivot.title">
{{item_pivot.text}}
</win-pivot-item>
</win-pivot>
<style>
.win-pivot-header {
color: #FFF !important;
}
.win-pivot-item {
position:static !important;
}
</style>
关于angularjs - 无法呈现 WinJS Angular Pivot 指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31589688/
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,因为
我正在实现一个 DataAdapter 以绑定(bind)到 WinJS ListView 控件。该接口(interface)需要一个返回 Promise 的 getCount 方法。如果我直接返回一
我正在尝试包装 WinJS rating control在 Angular2 组件中。当我调试时,我可以看到正在调用和执行 WinJS.UI.processAll();。但是我没有看到评分控件。 我怎
我想知道是否有人可以阐明为什么这不起作用。 如果我在我的 html View 中定义模板(第一个场景),我可以成功地动态模板化每个 WinJS.UI.ListView 项目。但是,如果我使用 $.ge
The MSDN documentation显示了为 Win8 WinJS 应用程序设置 onactivated 事件的两个选项: WinJS.Application.addEventListener
我在 HTML5/JAVASCRIPT 平台上开发 windows store app 并安装了 SPLIT APP 模板。 我想显示一个 HTML 页面。如果我使用 HTML Hyperlink 属
这可能是一个愚蠢的问题,但我一直无法找到答案。我想从我的 Windows 8 javascript 应用程序中使用 IE10 启动一个特定的 URL,即我的应用程序将被暂停,而 IE10 将启动。我如
在 WinJS 中,我这样声明类: WinJS.Namespace.define('MyNamespace', { MyClass: WinJS.Class.define(function c
我有一个在我的网站中使用过的 js 代码。我使用 eval() 来保密代码。但现在我需要在我的 winJS 应用程序中使用相同的代码。但我发现由于 WinJS.strictProcessing() ,
我已尝试使用以下代码来获取切换开关按钮的检查值。但我无法在JavaScript方法中找到切换开关的checked属性。 .js: var yammerpt = document.getElementB
我正在尝试在 WinJS (Windows Phone 8.1 UWP) 中的 ListView 上添加上下文菜单。首先,我想通过选择元素并添加事件监听器来添加它。这是我的 HTML 代码:
我在我的 UWP javascript 应用程序中使用 Parse javascript SDK。正如快速入门中提到的,我使用以下行初始化 Parse, Parse.initialize("App_I
我有一个为我的业务创建的 Windows 应用商店应用。我的企业已经成功使用它几个月了,但我们在读取保存的数据时偶尔会遇到错误;找到一种方法来最小化这些数据保存和读取错误是非常非常重要的。 具体来说:
例如,它需要调用使用 SSL 托管的 Web 服务。 如果可以的话,那么客户端证书如何通过呢? 非常感谢!! WinJS.xhr({ type: "
我尝试了以下代码来获取切换开关按钮的检查值。但是我无法在 JavaScript 方法中找到切换开关的 checked 属性。 .js: var yammerpt = document.getEleme
谁能告诉我如何处理 WinJS 代码中未处理的异常。有没有更好的方法来处理它们而不是使用 try/catch block 。我已经在我的代码的某些部分使用了 try/catch block 。 最佳答
我正在开发 Windows 8 应用商店应用程序(使用 WinJS - html5、js、jquery),我正在尝试使用它; WinJS.Navigation.back(); 此后退功能有效并返回一页
我正在使用 HTML/CSS/JS 和 WinJS 框架开发适用于 Windows 应用商店的应用程序。 我的应用程序需要在启动时加载配置数据,如果在线则通过网络加载,如果不在线则通过本地加载。 我的
我正在寻找一种方法来显示存储在字节数组中的 JPEG 图像。这是一个用 Javascript 构建的 Windows 8 商店应用程序。字节数组从 C# WinRT 组件返回。它在 C# 中的类型是
有没有办法直接在我的 WinJS 控件选项定义中使用 WinJS 评估全局资源,而不是使用 data-win-res 属性,因为特定选项是一个复杂的对象? 这是我所拥有的: 以下尝试评估资源会崩溃
我是一名优秀的程序员,十分优秀!