當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript FirebaseAuth.createUser方法代碼示例

本文整理匯總了TypeScript中angularfire2.FirebaseAuth.createUser方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript FirebaseAuth.createUser方法的具體用法?TypeScript FirebaseAuth.createUser怎麽用?TypeScript FirebaseAuth.createUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在angularfire2.FirebaseAuth的用法示例。


在下文中一共展示了FirebaseAuth.createUser方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: registerUser

    /**
     * this create in the user using the form credentials. 
     *
     * we are preventing the default behavor of submitting 
     * the form
     * 
     * @param _credentials {Object} the email and password from the form
     * @param _event {Object} the event information from the form submit
     */
    registerUser(_credentials, _event) {
        _event.preventDefault();

        this.auth.createUser(_credentials).then((value) => {
            console.log(value)
            this.dismiss()
        }).catch((error) => {
            this.error = error
            console.log(error)
        });
    }
開發者ID:krispassa,項目名稱:ionic2-angularfire-sample,代碼行數:20,代碼來源:login.ts

示例2: registerUser

 registerUser(email:string, password:string):Promise<any>{
   return this.auth.createUser({
     email: email,
     password: password
   })
   .then(() => this.auth.login({
     email: email,
     password: password
   }))
   .then(user => Promise.resolve( user ))
   .catch(error => Promise.reject( error ));
 }
開發者ID:EscuelaIt,項目名稱:class-10-demo,代碼行數:12,代碼來源:auth.ts

示例3: Promise

    return new Promise((resolve, reject) => {
      this.auth.createUser(credentials)
      .then((authData) => {

        this.authData = authData;
        resolve(this.authData);

      })
      .catch((error) => {
        reject(error);
      });
    });
開發者ID:thejoytoledo,項目名稱:trovarte,代碼行數:12,代碼來源:authentication.ts

示例4: signup

    signup(_credentials) {
        this.auth.createUser(_credentials)
            .then((authData) => {
                console.log(authData);

                _credentials.created = true;

                return this.createUser(_credentials);

            })
            .catch((error) => {
                this.error = error
                console.log(error)
            });
      }
開發者ID:dylanspurgin,項目名稱:heybro,代碼行數:15,代碼來源:signup.ts

示例5: registerUser

    /**
     * this create in the user using the form credentials. 
     *
     * we are preventing the default behavor of submitting 
     * the form
     * 
     * @param _credentials {Object} the email and password from the form
     * @param _event {Object} the event information from the form submit
     */
    registerUser(_credentials, _event) {
        _event.preventDefault();

        this.auth.createUser(_credentials).then((authData) => {
            console.log(authData)

            _credentials.created = true;

            return this.login(_credentials, _event);

        }).catch((error) => {
            this.error = error
            console.log(error)
        });
    }
開發者ID:joschi04,項目名稱:AuditMobil,代碼行數:24,代碼來源:login.ts

示例6: registerUser

	private registerUser(credentials) {
		this.showLoading();

		this.auth.createUser(credentials).then((authData) => {
			this.loading.dismiss();
			let prompt = Alert.create({
				title: 'Sucesso',
				subTitle: 'Sua conta foi criada!',
				buttons: ['OK']
			});
			this.nav.present(prompt);
		}).catch((error) => {
			this.showError(error);
		});
	}
開發者ID:lgmbarata,項目名稱:eCondominio,代碼行數:15,代碼來源:login.ts

示例7: registerUser

 public registerUser(credentials){
   this.showLoading();
   
   this.auth.createUser(credentials).then((authData) =>{
     this.loading.dismiss();
     let prompt = Alert.create({
       title: 'Success',
       subTitle: 'Your new Account was created!',
       buttons: ['OK']
     });
     
     this.nav.present(prompt);
   }).catch((error) => {
       this.showError(error)
     });
 }
開發者ID:ng-mohit,項目名稱:ionic2-firebaseauth,代碼行數:16,代碼來源:login.ts

示例8: signUp

 signUp() {
     if(this.doPasswordsMatch()) {
         var creds: any = {email: this.registerEmail, password: this.registerPassword};
         this._auth.createUser(creds)
                     .then((success) => {
                         this.error = false;
                         success.auth.sendEmailVerification();  // working!
                         this.addItem(event);
                         this.clear();
                     })
                     .catch((error) => {
                         this.displayError("Firebase failure: " + error);
                     });
     }
     else {
         this.displayError("Passwords do not match.");
     }
 }
開發者ID:JSpell,項目名稱:angular2-firebase,代碼行數:18,代碼來源:register.component.ts


注:本文中的angularfire2.FirebaseAuth.createUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。