BCLtd
BCLtd

Reputation: 1461

Hyperlink in Angular/Ionic

I am having some issues adding a hyperlink to a 'hcard' in ionic. I am using the following plugin (https://github.com/drewrygh/ionic-ion-horizontal-scroll-cards) and the codepen is here: http://codepen.io/drewrygh/pen/jEJGLx

When I try to add hyperlink to hcard nothing happens. What is the best way to do this, does anyone know?

<div ng-controller="barsCtrl">
            <h4>Top Rated Bars</h4>
            <hscroller> 
              <hcard ng-repeat="bar in bars" index="{{$index}}" desc="{{bar.name}}" image="{{bar.profile_pic}}">
              </hcard>
            </hscroller>
          </div>

Upvotes: 0

Views: 2123

Answers (1)

aquint
aquint

Reputation: 512

Do you mean you want the cards to link to something as an anchor tag? You can wrap the cards in an anchor tag: http://codepen.io/anon/pen/Nqvjpv

<a ng-repeat="item in items" href="http://www.google.com?q={{item.desc}}" target="_blank">
    <hcard  index="{{$index}}" desc="{{item.desc}}" image="{{item.image}}"></hcard>
</a>

Upvotes: 1

Related Questions