小编nic*_*ick的帖子

Node-sass不理解代字号

探索angular-cli最近发布的Angular2的RC1我遇到了一个奇怪的问题:node-sass在sass插件中,在包名称之前angular-cli没有解析~抛出以下错误:

Error: File to import not found or unreadable: ~@angular2-material/core/style/theme-functions
Run Code Online (Sandbox Code Playgroud)

它在编译以下代码时发生:

@import "~@angular2-material/core/style/theme-functions";
Run Code Online (Sandbox Code Playgroud)

如果我删除波浪号,一切都会好的.这是正确的行为,还是有道路可以node-sass理解~

PS我使用WebStorm,它也喜欢使用它~.如果省略波浪号,则会导致解析路径无法解决.经过一些谷歌搜索后,我发现使用没有代字号的代码是遗留的,~应该用作最佳实践.这样对吗?

sass node.js angular

11
推荐指数
2
解决办法
7353
查看次数

在角度小吃店中居中文本

在有角度的小吃店中居中文本的正确方法是什么?

我试过这个,这不起作用:

let config = new MatSnackBarConfig();
config.panelClass = 'center';
this.snackBar.open(message, undefined, config);
Run Code Online (Sandbox Code Playgroud)

然后在一些 css 文件中(在同一个组件中,或者在全局文件中):

.center {
   justify-content: center;
}
Run Code Online (Sandbox Code Playgroud)

angular-material2 angular angular5

6
推荐指数
2
解决办法
1万
查看次数

Angular Material Chips 显示在输入框下方

我正在使用 Angular Material 创建在输入字段中输入的芯片。因此,文档示例中给出的当前默认行为是在输入框中显示筹码。我不想在我的输入字段中显示这些芯片,我想做的是当用户输入任何内容时,应该在输入字段下创建芯片(而不是在输入字段内)。您可以通过任何示例链接帮助我。

angular-directive angular-material angular

4
推荐指数
1
解决办法
1万
查看次数

为什么$ env:username和[environment] :: username返回不同​​的用户?

是什么PowerShell的之间的区别$env:username,并[environment]::username他们为什么要返回的潜在用户不同?(我知道还有其他方法可以吸引当前用户)

一些背景:

我有一个Azure管道,在发布目标上运行PowerShell脚本。管道代理配置为在特定服务帐户下运行。该PowerShell脚本的一部分用于$env:username分配权限。但是,权限将分配给本地管理员帐户。如果我更改脚本以使用[environment]::username正确的服务帐户,则将为用户授予权限。

powershell

4
推荐指数
1
解决办法
71
查看次数