Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

ng-click not working in zf-tab #805

Open
Silur opened this issue Apr 11, 2016 · 3 comments
Open

ng-click not working in zf-tab #805

Silur opened this issue Apr 11, 2016 · 3 comments

Comments

@Silur
Copy link

Silur commented Apr 11, 2016

This was submitted in last year, still not fixed:

<!-- work -->
<a ng-click="test()">test</a>

<!-- doesn't work -->
<div zf-tabs="">
    <div zf-tab="" title="Tab1">
        <a ng-click="test()">test</a>
    </div>
    <div zf-tab="" title="Tab2">
        Tab content 1
    </div>
</div>

$scope.test = function() {
    console.log('test');
}
@mattgrande
Copy link

It's ugly as hell, but you basically need to call $parent for every zf-directive you're in, so your new ng-click would be $parent.$parent.test().

(This is from memory; It might only be one $parent)

@Silur
Copy link
Author

Silur commented Apr 12, 2016

Thank you :)
I came up with this solution too, but if we are using angular, what can handle nested directives then an angular-based framework should be able to handle it too. That's what I mean under "fixed"

@soumak77
Copy link
Contributor

this issue with be addressed with base-apps/angular-base-apps#24

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants