How to bind service property in comtroller


#1

for example I have a service called ‘member-http’ ,Now I want bind emailPatten(for validate user’s Input) definded in ‘member-http’ service(or access)

  _emailPatten:Ember.computed.alias('service.member-http.emailPatten'),//this is not work_


import Ember from 'ember';

export default Ember.Controller.extend({
  memberHttp: Ember.inject.service('member-http'),
  myPre: Ember.inject.service('my-pre'),
  notify: Ember.inject.service('notify'),
  email:'',
  password:'',
  passwordAgin:'',
  phone:'',
  nickname:'',
  emailPatten:Ember.computed.alias('service.member-http.emailPatten'),//this is not work
  actions:{
    signUp(){
     let service=this.get('memberHttp');
      service.signUp(this.get('email'),this.get('password'),this.get('phone'),this.get('nickname'));
    }
  }
});

#2

emailPatten: Ember.computed.alias('memberHttp.emailPatten')