jeudi 9 août 2018

ng-click in tag

I'm trying to add a button with ng-click on my header with a tag but as per testing the ngclick function is not triggering with the tag.

If I remove the tag its working as expected.

HTML

<div class="nav-holder main-menu">
    <nav>
        <ul>
            <li>
                <button ng-controller="RestaurantPageCtrl" ng-click="scrollxx()">Checkout</button>
            </li>
        </ul>
    </nav>
</div>

Angular

$scope.scrollxx = function( ) {
    console.log("scrolltoaaaa");
}

Any suggestion on how to make it work?




Aucun commentaire:

Enregistrer un commentaire