Hi guys,
I have HTML code:
<ul class="nav nav-pills">
<li ng-class="{active:ctrl.isFilterType()}">
<a href ng-click="ctrl.setFilterType()">All</a>
</li>
<li ng-class="{active:ctrl.isFilterType('typeA')}">
<a href ng-click="ctrl.setFilterType('verb')">Type A</a>
</li>
<li ng-class="{active:ctrl.isFilterType('typeB')}">
<a href ng-click="ctrl.setFilterType('phrase')">Type B</a>
</li>
</ul>
is it possible to describe array of types for filtering in controller (in
JS) like this?
var typeFilterButtons = [
{name: "All", type:null},
{name: "Type A", type:'typeA'},
{name: "Type B", type:'typeB'}
];
Do I need to use directives somehow?
Thank you.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.