我在.NET Core中创建了一个空的 Web应用程序,wwwroot我的index.html没有加载为默认页面,只有在我明确调用它时才会加载.
这是我的project.json
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
]
}
Run Code Online (Sandbox Code Playgroud)
在这里我的启动:
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 …Run Code Online (Sandbox Code Playgroud) Angular在运行时为文件生成随机名称ng build --prod.有没有办法指定我们想要的名字?我们正在使用angular-cli.我们确实需要这个,因为我们的角度应用程序嵌入在CMS平台中.
我开发了离子2,我试图在Android Studio中打开项目(来自离子android构建).
我收到以下错误:
错误:未找到已安装的构建工具.请安装Android构建工具版本19.1.0或更高版本.
问题是已经安装了Build Tool:
我正在使用最新版本的cordova和ionic2.
有什么想法吗?
我们有一个基本的 GitLab CI 模板,默认情况下包含某些工件。现在我们需要将此模板包含在我们拥有的管道之一以及我们不希望传递工件的作业中。
我们尝试过这个:
artifacts: []
Run Code Online (Sandbox Code Playgroud)
编辑
这是我的例子:
基础.yaml
build:
stage: build
script:
- echo "build..."
artifacts:
expire_in: 3 weeks
reports:
dotenv: VERSION.env
paths:
- '$env:BUILD_OUTPUT_DIR\**\webconfigs'
- '$env:MSBUILD_OUTPUT_DIR\**\_PublishedWebsites\**\*.zip'
Run Code Online (Sandbox Code Playgroud)
孩子.yaml
include: 'base.yaml'
build:child:
extends: [build]
before_script: []
script:
- *run-nuget-restore
- *build-release
artifacts: [] # I don't need any of the atributes of the base template, but this does not work
Run Code Online (Sandbox Code Playgroud)
但这是无效的!如何将工件属性设置为空?
我们需要创建一个drag and drop指令。usingdrag and drop events不适用于 SVG 元素,因此,我们需要使用标准mousedown,mousemove和mouseup事件。我在 JavaScript 中看到了一些示例,但不知何故我无法将其与 Angular 一起使用。
mousemove只要未选择可拖动元素即可工作。
如何选择元素并用 拖动它HostListener mousemove?
我创建了一个StackBlitz,以便您可以看到我所做的事情。如果我拖动元素并打开控制台,您将看到该mousemove事件不会被触发。
我缺少什么?
当我创建一个构建定义时,我被问到了一个或另一个.主要区别是什么?这是一个虚拟问题吗?我是配置构建模板的新手.我可以创建它们,但我也想了解它们!
我过去常常用来tsd管理我的类型定义,但由于它已被弃用,我试图迁移到typings我的意见更复杂,但我应该是要走的路.
我想安装一个类型定义,为此我使用了--ambient标志.
在Visual Studio中,我有一个typings.json看起来像这样的文件:
{
"name": "Test",
"version": false,
"ambientDependencies": {
"angular": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular.d.ts#ca92a5b250433c38230b5f4138b36453862342bf",
"jquery": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#ca92a5b250433c38230b5f4138b36453862342bf"
}
}
Run Code Online (Sandbox Code Playgroud)
这是从迁移tsd到自动创建的,typings但现在我需要一个新的类型定义,例如angular-route我使用以下命令:
typings install angular-route --ambient
这工作正常,但typings.json没有得到更新.
有什么意义,为什么我错过了?为什么angular和jquery这两个迁移到typings.json并安装时,angular-route该文件没有得到更新?
我们是第一次开发应用程序,设计师已经在视网膜模式中对布局进行了原型设计,虽然这不是我们下一个版本的目标,但现在我们要做的就是获得他提供的价值并除以2.
例如,我们有一个标签来显示文本,标签有以下内容scss:
label {
font-family: $font-family-medium;
color: color($colors, slate);
font-size: 2.25rem / 2;
letter-spacing: 0.0625rem / 2;
line-height: 3.25rem / 2;
white-space: normal;
}
Run Code Online (Sandbox Code Playgroud)
这是结果:
这看起来不错,但根据我应用代码的位置,chrome告诉该css属性无效.好的,然后我将函数添加calc到上面的代码中:
label {
font-family: $font-family-medium;
color: color($colors, slate);
font-size: calc(2.25rem / 2);
letter-spacing: calc(0.0625rem / 2);
line-height: calc(3.25rem / 2);
white-space: normal;
}
Run Code Online (Sandbox Code Playgroud)
所以chrome停止抱怨,但结果是:
标签中的文字变得越来越小.
使用calc和不使用calcsass有什么区别?
我想我错过了一些重要的布局/设计概念?
更新:
我刚刚意识到chrome的第一个代码总是无效的:
这是我想出的一点.那么视网膜模式除以2的计算是不是很好?
我正在使用Angular2和TypeScript在Visual Studio 2015中开发Web应用程序.我正在使用Gulp生成分布式缩小文件.使用Angular2,我看到,没有必要使用Visual Studio或Gulp来转换TypeScript,因为SystemJs在导入模块时会这样做.js
现在的问题是:
SystemJs如何处理缩小,丑化等问题?
System.import('app/main').then(null, console.error.bind(console));
Run Code Online (Sandbox Code Playgroud)
我如何缩小或丑化这个?
bundling-and-minification typescript systemjs visual-studio-2015 angular
如何使用flex在avatar下集中这个跨度?
如果我删除跨度,则头像图像很好地集中,但是当我插入跨度时,即使display:block它显示在右侧也是如此.
这是我的HTML:
<ion-navbar *navbar>
<ion-avatar item-center>
<img src="img/bill-gates-avatar.jpg">
<span>Bill Gates</span>
</ion-avatar>
</ion-navbar>
<ion-content padding>
Content here...
</ion-content>
Run Code Online (Sandbox Code Playgroud)
那是我的SCSS:
.tabs {
ion-navbar-section {
min-height: 16.6rem;
}
.toolbar {
min-height: 170px;
}
ion-avatar {
display: flex;
justify-content: center;
align-content: center;
}
ion-avatar img {
max-width: 8rem;
max-height: 8rem;
border-radius: 5rem;
border: 2px solid color($colors, light);
}
}
Run Code Online (Sandbox Code Playgroud) $font-family-baseIonic2中的变量不起作用.
在app.variable.scss文件中我添加了一个新值,但旧值仍然存在.
其他变量如$font-size-base工作正常
这些是我建造的最大任务www:
gulp.task("fonts", function () {
return copyFonts({
src: [
"app/fonts/**/*.+(eot|ttf|woff|woff2|svg)"
]
});
});
gulp.task("sass", function () {
return buildSass({
sassOptions: {
includePaths: [
"node_modules/ionic-angular",
"node_modules/ionicons/dist/scss"
]
}
});
});
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
那是我的字体
@font-face {
font-family: "Maven Pro";
font-style: normal;
font-weight: 400;
src: local("Maven Pro"), local("Maven-Pro-Regular"), url("#{$font-path}/MavenPro-Regular.ttf") format("truetype");
}
@font-face {
font-family: "Maven Pro";
font-style: normal;
font-weight: 500;
src: local("Maven Pro Medium"), local("Maven-Pro-Medium"), url("#{$font-path}/MavenPro-Medium.ttf") format("truetype");
}
@font-face {
font-family: "Maven Pro"; …Run Code Online (Sandbox Code Playgroud) 我们正在尝试在 Azure Pipeline 中自动化 Teams Tab 应用程序,但我们想知道这是否可能。我们已经为应用程序创建了 zip 文件,该文件可以通过 App Studio 上传并且可以正常工作。但是我们不希望客户通过 App Studio 这样做,相反,我们希望在他们的管道上自动化这个过程。为此,我们创建了以下 powershell:
# Generate zip file for deployment
$compress = @{
Path = "color.png", "outline.png", "manifest.json"
CompressionLevel = "Fastest"
DestinationPath = "app.zip"
}
Compress-Archive @compress -Update
Run Code Online (Sandbox Code Playgroud)
然后我们检查是否MicrosoftTeams安装了模块,否则我们安装它:
# Checks whether MicrosoftTeams module is available
if (Get-Module -ListAvailable -Name "MicrosoftTeams") {
Write-Verbose "MicrosoftTeams module already installed."
}
else {
Write-Verbose "Installing module MicrosoftTeams - https://docs.microsoft.com/en-us/powershell/module/teams/?view=teams-ps."
Install-Module MicrosoftTeams
}
Write-Verbose "Importing module MicrosoftTeams."
Import-Module MicrosoftTeams
Run Code Online (Sandbox Code Playgroud)
我们与 …
angular ×3
css ×3
ionic2 ×3
sass ×3
android ×1
angularjs ×1
asp.net-core ×1
automation ×1
azure-devops ×1
c# ×1
cordova ×1
flexbox ×1
gitlab ×1
html ×1
ionic3 ×1
json ×1
powershell ×1
styles ×1
systemjs ×1
team-build ×1
tfs ×1
tsconfig ×1
typescript ×1