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

The package does not work in a package #20

Open
kjetilge opened this issue Apr 1, 2016 · 4 comments
Open

The package does not work in a package #20

kjetilge opened this issue Apr 1, 2016 · 4 comments

Comments

@kjetilge
Copy link

kjetilge commented Apr 1, 2016

When I try to use this package in another package it complains that it can't find "basicTabs". If I paste the "basicsTab" template in to the html of my package then I get "Error: No such function: isActiveTab".
I've tried to include the package in all possible load orders but still no luck. Any one knows whats going on ?

@kjetilge
Copy link
Author

kjetilge commented Apr 6, 2016

Fixed it. Hours of nerding - dont know exactly how it came to work. However, now if I return a particular slug name from the "activeTab" helper it doesn't do anything- event if I hardcode the slug name to be returned - strange.

@kjetilge
Copy link
Author

kjetilge commented Apr 6, 2016

Fixed the activeTab issue - had to read the manual :-)
The helper was configured like: {{#basicTabs name="" tabs=tabs }}

but actually ha to add: activeTab=activeTab in the helper:
{{#basicTabs name="" tabs=tabs activeTab=activeTab}}

@shyal
Copy link

shyal commented Sep 12, 2016

+1

@shyal
Copy link

shyal commented Sep 12, 2016

fixed by adding

ReactiveTabs.createInterface
  template: 'basicTabs'
  onChange: (slug, template) ->
    # This callback runs every time a tab changes.
    # The `template` instance is unique per {{#basicTabs}} block.
    # console.log '[tabs] Tab has changed! Current tab:', slug
    # console.log '[tabs] Template instance calling onChange:', template
    return

in startup.coffee

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