小编Tan*_*ino的帖子

材质角度扩展面板示例不起作用

我对 Material Angular 很陌生,我正在尝试向我的项目添加一些组件。

现在我正在尝试将扩展面板组件示例添加到对话框中,但该组件不起作用,我正在解决问题,但我不明白为什么。

我正在研究Angular 5.2.0Material Angular 5.2.5

我已经在 main.ts 中导入了该模块

import {MatExpansionModule} from '@angular/material/expansion';
Run Code Online (Sandbox Code Playgroud)

我创建了expansion-overview.component.html

<mat-accordion>
<mat-expansion-panel>
    <mat-expansion-panel-header>
        <mat-panel-title>
            Personal data
        </mat-panel-title>
        <mat-panel-description>
            Type your name and age
        </mat-panel-description>
    </mat-expansion-panel-header>

    <mat-form-field>
        <input matInput placeholder="First name">
    </mat-form-field>

    <mat-form-field>
        <input matInput placeholder="Age">
    </mat-form-field>
</mat-expansion-panel>
<mat-expansion-panel (opened)="panelOpenState = true"
                     (closed)="panelOpenState = false">
    <mat-expansion-panel-header>
        <mat-panel-title>
            Self aware panel
        </mat-panel-title>
        <mat-panel-description>
            Currently I am {{panelOpenState ? 'open' : 'closed'}}
        </mat-panel-description>
    </mat-expansion-panel-header>
    <p>I'm visible because I am open</p> …
Run Code Online (Sandbox Code Playgroud)

html typescript angular-material angular

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

如何从 build.gradle 中提取版本到 Jenkins 管道

我正在尝试从 build.gradle 中提取我的应用程序版本,但我并没有如我所愿。

在我的 build.gradle 上,我有几个属性和我想要的一个:

版本 = '1.4.1-快照'

所以,在我的 Jenkinsfile 上,我做了:

def version_value = sh(returnStdout: true, script: "cat build.gradle | grep -o 'version = [^,]*'").trim()
sh "echo Project in version value: $version_value"
def version = version_value.substring(0, version_value.indexOf('='))
sh "echo final version: $version"
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

+ cat build.gradle
+ grep -o version = [^,]*
[Pipeline] sh
[QR_CODE_GATEWAY] Running shell script
+ echo Building project in version value: version = 1.4.1-SNAPSHOT
Project in version value: version = 1.4.1-SNAPSHOT
+ version = 
/var/jenkins_home/workspace/PROJECT@tmp/durable-bbc0290d/script.sh: …
Run Code Online (Sandbox Code Playgroud)

continuous-integration jenkins jenkins-groovy jenkins-pipeline

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