我熟悉laravel artisan命令
令:要求
但是我似乎无法将它放在目录中.例如,我有一个目录结构
应用程序/ HTTP /请求/用户
我想在该文件夹中对命名空间进行适当的放置,但是
php artisan make:request User\CreateUserRequest
Run Code Online (Sandbox Code Playgroud)
不起作用.
我需要按价格循环查看列表顺序,一旦价格不存在,我就会显示一条不可用的消息,但我不想为每个空元素显示它.我正在使用角度1.2
<div ng-repeat="item in list | orderBy: 'cost'">
<div ng-if="cost == 0 and not already shown">Sorry the following are unavailable</div>
<div>...my item here...</div>
<div>
Run Code Online (Sandbox Code Playgroud) 我有一个gulp任务,它使用yargs接受参数.从命令行我做了类似的事情gulp scaffold:thing --name=someName --path=some/path-to/{thing}.我希望能够调用它并提示用户输入所需的参数,这是否可以通过任务运行器?
我尝试过使用node的param库,但visual studio输出根本没有显示提示.
我已经设置了一个非常简单的functions.html,它启动了一个同样简单的对话框,只注册Office.initialize和控制台日志.如果打开时间太长,我在控制台中会出现一个大错误,除了刷新外,对话框变得不可用.
这是一个已知问题还是我需要采取不同的做法?
dialog.html
<!DOCTYPE html>
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
<title>React App</title>
<script>
Office.initialize = x => {
console.log('initialized')
}
</script>
</head>
<body style="height: 100%">
yo stuff
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我的js看起来像这样
export const showSmsModal = () => {
officeCtx().ui.displayDialogAsync(`${window.location.origin}/test.html`, {displayInIframe: true, height: 40, width: 40}, ({ value: dialog }) => {
console.log(dialog)
return dialog
})
}
Run Code Online (Sandbox Code Playgroud)
我得到的部分错误如下:
t(t)中未捕获的异常{var o = e.call(this,t)|| this; …
我弄完了
npm install -g typescript@beta
npm install -i --save-dev typescript@beta
安装了业内人士打字稿视觉工作室代码.
之后,我从他们的typescript 2.0声明中将以下行插入到我的项目中,并且vscode将其强调为无效.
let foo: string | null = null;
如果重要的是我的项目是用的ng new my-project.
这里还有我的project.json文件和tslint.json文件
{
"name": "portal-app",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"postinstall": "typings install",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/forms": "0.2.0",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/router": "3.0.0-alpha.8",
"es6-shim": "0.35.1",
"ng2-bootstrap": "^1.0.20",
"reflect-metadata": …Run Code Online (Sandbox Code Playgroud)