Created
January 9, 2015 10:53
-
-
Save onlymejosh/e507d58e832d396930c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`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