如何在多行中使用Angular 4 + BootStrap徽章?

时间:2018-07-06 19:38:54

标签: angular bootstrap-4

如何将Angular 4 + BootStrap徽章用于多行?

我的HTML:

        for file in files: #loops through uploads array more specifically each FileField (upload, upload2, upload3, etc)
            # if not len(request.files[file]) == 0:
            if file not in files:
                filename = str(upload[0] + '_' + file.filename).replace(' ', '')
                section_urls.append(current_app.config['NEVCODOCS_BASE_URL'] + folder + filename)
                path = "ServiceRegistration/" + folder + filename
                s3.Bucket('nevcodocs').put_object(Key=path, Body=file)

我尝试:

<span [hidden]="docker.code==0" class="badge badge-danger">{{docker.console}}</span> line1\nline2

我再次尝试:

line1<br/>nline2

1 个答案:

答案 0 :(得分:0)

我找到了解决方法:

<span [hidden]="docker.code==0" class="badge badge-danger"><div [innerHTML]="docker.console"></div></span>