Skip to content

Instantly share code, notes, and snippets.

@MiracleBlue
Forked from onlymejosh/gist:e507d58e832d396930c6
Last active August 29, 2015 14:13
Show Gist options
  • Save MiracleBlue/8dd38575fb8cc973c7aa to your computer and use it in GitHub Desktop.
Save MiracleBlue/8dd38575fb8cc973c7aa to your computer and use it in GitHub Desktop.
`import Ember from 'ember'`
IndexController = Ember.ObjectController.extend
needs: ['application']
actions:
hasProjects: (->
@get('model.length') > 0
).property('model.length')
`export default IndexController`
# application.hbs
{{onboarding-tour projects=controllers.index.hasProjects}}
# components/onboarding-tour.coffee
`import Ember from 'ember'`
OnboardingTour = Ember.Component.extend
projects: null
tour: null
didInsertElement: ->
....
startTour: (->
@get('tour').start() unless @get('projects')
).observes('projects')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment