我有这个变量:
$gutter: 10;
Run Code Online (Sandbox Code Playgroud)
我想在像SCSS这样的选择器中使用它:
.grid+$gutter {
background: red;
}
Run Code Online (Sandbox Code Playgroud)
所以输出变成CSS:
.grid10 {
background: red;
}
Run Code Online (Sandbox Code Playgroud)
但这不起作用.可能吗?
我有一个使用 CLI 在 Angular 7 上构建的角度解决方案。该应用程序有 2 个区域。它们没有以任何方式连接,但它们使用相同的代码库。
现在我可以去http://localhost:4200/app1,或http://localhost:4200/app2。但它们运行在同一个实例上。我想修改我的配置,这样我就可以写一些类似的东西
ng build --app=app1
Run Code Online (Sandbox Code Playgroud)
并获得独立的解决方案。有什么建议,我能做什么?
下面是我的 angular.json 文件。如您所见,我已经为开发、登台和生产做好了准备。这意味着此刻,我可以写
ng build --build-optimizer --configuration=staging
Run Code Online (Sandbox Code Playgroud)
并为登台环境构建一个版本。
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"vhTogo": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/vhTogo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets",
"src/manifest.json"
],
"styles": [
"src/styles/styles.scss"
],
"scripts": []
},
"configurations": {
"production": { …Run Code Online (Sandbox Code Playgroud) 嗨,我想在我的li中添加一个"active"类,如果它是活动的,或者如果我在它下面的页面上.我有以下代码
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}
<nav class="topNav">
<ul>
@foreach (var item in Model.Content.AncestorOrSelf(1).Children.Where(x => x.IsVisible() && x.IsDocumentType("Subfrontpage") || x.IsDocumentType("Procesguide")))
{
<li>
<a href="@item.Url">@item.Name</a>
</li>
}
</ul>
</nav>
Run Code Online (Sandbox Code Playgroud)
我想我可以用这个做点什么,但它给出了一个错误
var isSelected = Model.Path.Contains(item.Id.ToString()) ? "active" : "";
<li class="@Html.Raw(isSelected)">
<a href="@item.Url">@item.Name</a>
</li>
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误.第10行.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'Umbraco.Web.Models.RenderModel' …Run Code Online (Sandbox Code Playgroud) 我在设置 jquery 旋钮动画时遇到问题。正如您在我的示例中看到的,只有最后一个动画。
<input class="knob nummer1 animated" value="0" rel="64">
<input class="knob nummer2 animated" value="0" rel="77">
<input class="knob nummer3 animated" value="0" rel="99">
Run Code Online (Sandbox Code Playgroud)
angular ×1
angular-cli ×1
css ×1
jquery-knob ×1
razor ×1
sass ×1
split ×1
umbraco ×1
variables ×1