Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined is not an object #75

Open
MADavies opened this issue Nov 23, 2016 · 1 comment
Open

Undefined is not an object #75

MADavies opened this issue Nov 23, 2016 · 1 comment

Comments

@MADavies
Copy link

Hi guys im having an issue trying to get panes to dynamically expand based on certain situations.

I am getting an error

Undefined is not an object

on page load.

Here is the code snippets to do with this issue:

html view
<v-accordion class="vAccordion--default md-padding" id="ticketAppointmentAccordion" control="appointmentsAccordian"> <v-pane class="ticket-accordian" id="appointment0">

JS Listener
$scope.$on('ticketAppointmentAccordion:onReady', function () { console.log("scope", $scope); $scope.appointmentsAccordian.expandAll(); });

If anyone knows why im getting this issue any help would be really appreciated thanks

@yamov
Copy link

yamov commented Mar 1, 2017

It seems that the control attribute does not work properly. But I was able to solve it by getting the control object from the argument passed to the callback like this:

$scope.$on('ticketAppointmentAccordion:onReady', function (e) { 
  e.targetScope.control.expandAll(); 
});

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

No branches or pull requests

2 participants