我正在努力将角度1.x站点移动到我使用angular-cli 1.0.0-beta.15创建站点的新角度2.0站点.
我有一个按钮可以将一些数据导出到CSV文件.当页面首次加载时,我收到一条错误消息"无法找到模块'文件保护程序'",但是当我点击按钮时,一切都运行正常.
我安装了FileSaver.js组件:
的package.json
...
"dependencies": {
...
"@types/filesaver": "0.0.30",
"file-saver": "^1.3.2"
...
}
...
Run Code Online (Sandbox Code Playgroud)
在我的export.service.ts中:
import { saveAs } from 'file-saver';
...
let file = new Blob(['hello world'], { type: 'text/csv;charset=utf-8' });
saveAs(file, 'helloworld.csv');
...
Run Code Online (Sandbox Code Playgroud)
有谁知道如何解决此错误?
我一直在尝试设置基本的CRUD操作示例SharePoint 2013 App.
我有一个开发人员模板站点设置(例如reporting.domain.com/sites/dev).在该网站内,我有一个带有文件的"文档库"应用程序/列表设置.我在清单中给出了"web"写入权限.
我需要的是通过REST API执行基本的CRUD操作.现在我只是尝试获取和删除操作.我收到400"错误请求".我完全陷入困境.想法?
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<m:error xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">
<m:code>-2147024809, System.ArgumentException</m:code>
<m:message xml:lang=\"en-US\">Value does not fall within the expected range.</m:message>
</m:error>
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的javascript代码.gethostWebTitleAndCreated有效,但getReport或deleteReport都不起作用
(function () {
'use strict';
var hostweburl,
appweburl;
// Function to retrieve a query string value.
// For production purposes you may want to use
// a library to handle the query string.
function getQueryStringParameter(paramToRetrieve) {
var params, i, singleParam;
params = document.URL.split("?")[1].split("&");
for (i = 0; i < params.length; i = i + 1) { …Run Code Online (Sandbox Code Playgroud)