728x90

typescript/kuzzle + elastic search 8

커즐(kuzzle) 활용 예시 5(아이디/닉네임 중복확인) v5.x

confirmOverlapId() { this.kuzzle .collection('collection_name', 'index_name') .fetchDocument(this.userid, async function (error, result) { if (error && this.userid.length !== 0) { const alertId = await this.alertCtrl.create({ header: '아이디 중복확인', message: '사용 가능합니다.', buttons: [ { text: '확인', handler: data => { this.posUserId = true; } }] }); return await alertId.present(); } else if (result) { c..

커즐(kuzzle) 활용 예시 4(로그아웃/회원탈퇴) v5.x

import { Component, OnInit } from '@angular/core'; import { NavController, AlertController } from '@ionic/angular'; import { Storage } from '@ionic/storage'; import Kuzzle from 'kuzzle-sdk/dist/kuzzle.js'; @Component({ selector: 'app-mypage', templateUrl: './mypage.page.html', styleUrls: ['./mypage.page.scss'], }) export class MypagePage implements OnInit { kuzzle: any; userId: any; userPwd: any..

커즐(kuzzle) 활용 예시 3(아이디/패스워드 찾기) v5.x

//아이디, 패스워드 찾기 예시입니다. import { Component, OnInit } from '@angular/core';import Kuzzle from 'kuzzle-sdk/dist/kuzzle.js';@Component({ selector: 'app-findidandpwd', templateUrl: './findidandpwd.page.html', styleUrls: ['./findidandpwd.page.scss'],})export class FindidandpwdPage implements OnInit { isFindId = true; findIdName: any; findIdNickName: any; findPwdId: any; findPwdName: any; findPwdNickNam..

커즐(kuzzle) 활용 예시 1(회원가입) v5.x

// 가입 조건 유효성 검사 및 가입하기 구현 tsimport { Component, OnInit } from '@angular/core';import { LoadingController, AlertController, NavController } from '@ionic/angular';import Kuzzle from 'kuzzle-sdk/dist/kuzzle.js'; @Component({ selector: 'app-singup', templateUrl: './singup.page.html', styleUrls: ['./singup.page.scss'],})export class SingupPage implements OnInit { public type = 'password'; public show..

커즐(kuzzle) 활용 예시 2(로그인) v5.x

// 커즐 로그인 유효성검사 후 정상 로그인되는 ts 코드입니다. import { Component, OnInit } from '@angular/core';import { Router } from '@angular/router';import { Platform, AlertController, NavController } from '@ionic/angular';import { Storage } from '@ionic/storage';import Kuzzle from 'kuzzle-sdk/dist/kuzzle.js';@Component({ selector: 'app-login', templateUrl: './login.page.html', styleUrls: ['./login.page.scss'],})exp..

typescript 에서 kuzzle 로그인하기

import Kuzzle from 'kuzzle-sdk/dist/kuzzle.js'; export class LoginPage implements OnInit { kuzzle: any; constructor() {} ngOnInit() { this.kuzzle = new Kuzzle('192.168.0.26', this.kuzzle_callback.bind(this)); } // .bind(this) : kuzzle 모듈 내부에 선언된 this와 바깥의 this를 동기화시킴. kuzzle_callback (err, res) { this.kuzzle.login('local', {username: 'kuzzle id', password: 'kuzzle password'}, '로그인 세션 유지 시간', fun..

728x90