This file contains hidden or 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
| getUserList():Observable<User> { | |
| return http.get<User>('http://url.com/users/').retry(3); | |
| } |
This file contains hidden or 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
| this.http.get<User>('http://url.com/sub-url/').subscribe(data => ...) |
This file contains hidden or 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
| this.http.get('http://url.com/sub-url').map(res => res.json()).subscribe(data => ...) |
This file contains hidden or 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
| // login.html | |
| <form onSubmit={this.login.bind(this)}> | |
| <div className="form-group"> | |
| <label htmlFor="id" className="input-label">아이디</label> | |
| <input type="text" id="id" className="form-control" value={this.id} onChange={this.onChange.bind(this)} /> | |
| </div> | |
| <div className="form-group"> | |
| <label htmlFor="id" className="input-label">비밀번호</label> | |
| <input type="password" id="password" className="form-control" value={this.password} onChange={this.onChange.bind(this)} /> | |
| </div> |
This file contains hidden or 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 React from 'react'; | |
| import { inject, observer } from 'mobx-react'; | |
| import { action, computed, observable } from 'mobx'; | |
| import userService from '../../Shared/API/User'; | |
| import logo from '../../assets/sesung-logo.png'; | |
| import './Login.css' | |
| @inject('global') | |
| @observer | |
| class Login extends React.Component { |
This file contains hidden or 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
| Observable.from([1,2,3,4,5,6,7]) | |
| .map(x => x * 10) | |
| .filter(x => x < 30) | |
| .subscribe(x => console.log(x), null, () => console.log('finished!')); | |
| // ---- result ---- | |
| // 10 | |
| // 20 | |
| // finished! |
NewerOlder