将链接嵌入离子应用程序的Firebase文本中

时间:2018-12-01 12:06:10

标签: javascript html typescript firebase ionic3

我正在开发一个离子应用程序,其内容存储在Firebase中。如何在文字中嵌入链接?

例如,这是Firebase JSON文件的外观

"OtherActivities" : {
  "Food Truck Mania" : {
    "badgecolor" : "",
    "badgetext" : "",
    "enddate" : [ 2018, 8, 24, 21, 0, 0, 0 ],
    "icon" : "ios-restaurant",
    "id" : 5,
    "image" : "",
    "location" : "Behind  Aula in front of the library",
    "map" : [ 99, 99],
    "paragraph1" : "There are a variety of food trucks available for lunch, dinner, and snacks or drinks in between. Take a break from your day and share a bite with friends. ",
    "paragraph2" : "",
    "paragraph3" : "",
    "startdate" : [ 2018, 8, 24, 12, 0, 0, 0 ],
    "time" : "12:00 - 21:00",
    "title" : "Food Truck Mania",
    "website" : ""
  }, ...

现在,说我想在“食品卡车”中嵌入一个链接(google.com),以便用户可以单击食品卡车并重定向到google.com。怎么做?我发现实施起来特别棘手,因为我正在读取相应HTML文件中<p> .. </p>内的段落内容。

0 个答案:

没有答案