【问题标题】:Remove quotes Json with Angular使用 Angular 删除引号 Json
【发布时间】:2021-09-28 08:52:14
【问题描述】:

我通过管道 {{item.name | 使用 Angular 调用前端json}} json 文件中“string”类型的数据,如何使用 CSS 或 JS 删除引号?我看到“NameA”,但我希望看到不带引号的 NameA。

json 示例:

people = [{name: "NameA", name: "NameB"}]

感谢能给我支持的人

【问题讨论】:

  • 你的 html 是什么样的?

标签: css json angular string quotes


【解决方案1】:

json 管道返回变量的 json 表示形式,其中包含引号。

如果你只是想输出字符串,去掉json管道,使用{{ item.name }}。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-06-16
    • 1970-01-01
    • 2011-05-14
    • 1970-01-01
    • 2012-09-03
    • 2020-04-12
    • 1970-01-01
    相关资源
    最近更新 更多