在角度Js表达式中显示achor标签 [英] display achor tag in angular Js expressions

查看:51
本文介绍了在角度Js表达式中显示achor标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在AngularJS表达式中显示锚标记.问题是,当我尝试将锚标签显示为从API提取的图标时,它仅将原始路径显示为

I am not able to display the anchor tag inside the AngularJS expression. The problem is that when I am trying to display an anchor tag as an icon which is being fetched from the API, it's only displaying the raw path as

a href='../UserControls/DownloadRLCSFile.ashx?Path=\\dotnetdev\csv\RLCSDocuments\Registrations\ABACF\E.S.I.C. Registration\Sample.xlsx' target='_blank' download><i class='fa fa-download' style='font-size: 13pt;' ></i></a>

请找到以下代码:

<div id="Div2" ng-controller="BasicRegulatoryDetail"> 
  <h4 class="padder-sm  b-b"><b>Regulatory Updates</b></h4>

  <div>
    <div class="table-responsive">
      <table class="table table-striped bg-white ">
        <tbody>
          <tr ng-repeat="bs in BasicInfo" >
            <td><asp:HyperLink ID="HyperLink1" NavigateUrl="~/RLCS_Connect/RegulatoryUpdateDetails.aspx?Subject={{bs.Subject}}" runat="server">{{bs.Subject}}</asp:HyperLink></td>  
            <td>{{bs.Document_Path}}</td> //here i am facing the problem
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>

推荐答案

听起来像您可能需要ng-href:

Sounds like you might need ng-href:

https://docs.angularjs.org/api/ng/directive/ngHref

错误的编写方式:

<a href="http://www.gravatar.com/avatar/{{hash}}">link1</a>

正确的编写方式:

<a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>

这篇关于在角度Js表达式中显示achor标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆