function ExternalServiceViewModel() { this.el = '#external-service-options'; this.data = { service_type: '' }; this.computed = { isDropbox: function() { // This logic must be mirrored in App\ExternalService return this.service_type === 'dropbox'; }, isFacebook: function() { // This logic must be mirrored in App\ExternalService return this.service_type === 'facebook'; }, isGoogle: function() { // This logic must be mirrored in App\ExternalService return this.service_type === 'google'; }, isTwitter: function() { // This logic must be mirrored in App\ExternalService return this.service_type === 'twitter'; } } }