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
| /* webpack raw-loader */ | |
| import template from './hello.html'; | |
| Vue.component('hello', { | |
| template | |
| }); |
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
| export function beforeRequest(context, method, url, options = {}) { | |
| method = method.toLowerCase(); | |
| let defaultOptions = { | |
| timeout: 1000*10, // 10sec | |
| headers: { | |
| 'Authorization': 'Bearer xxx-token-xxx', | |
| 'Content-Type':'application/json' | |
| } | |
| }; |
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
| // before | |
| module.exports = { | |
| api: { | |
| development: { | |
| apiUrl: "" | |
| }, | |
| minor: { | |
| apiUrl: "" | |
| } | |
| } |
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
| app.all('/v1/*', (req, res) => { | |
| request[req.method.toLowerCase()]({ | |
| url: config.ApiServer+req.url, | |
| headers: { | |
| 'Authorization': req.headers['authorization'], | |
| 'Content-Type': req.headers['content-type'] | |
| }, | |
| qs: req.query, | |
| json: req.body | |
| }, (err, response, body) => { |
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
| Woowahan.View.create('myview', { | |
| events: { | |
| '@transaction fetch-order-info', 'doneAction' | |
| }, | |
| doAction() { | |
| this.createTransaction('fetch-order-info', [ | |
| Woowahan.Action.create(FETCH_ORDER_INFO, {}), | |
| Woowahan.Action.create(FETCH_MEMBER_INFO, {}), |
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
| const fooView = Woowahan.View.create('fooView', { | |
| useStore: { | |
| rules: 'orderRule, bannerRule', | |
| addressInfo: { | |
| props: 'si,gu,gun,detail', | |
| listen: true | |
| }, | |
| memberInfo: '*', | |
| orderNo: 'orderInfo.orderNo' |
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
| function Foo() { | |
| // this ๋ new ์ฐ์ฐ์๋ก ํธ์ถ๋์์ ๋๋ฅผ ์ ์ ํ๋ค | |
| // this ๋ ์ธ์คํด์ค ๊ฐ์ฒด | |
| this.myname = 'Foo'; | |
| this.displayName = function() { | |
| // this ๋ ์ธ์คํด์ค ๊ฐ์ฒด๋ฅผ ์ ์ ํ๋ค. | |
| // ๋ฐ๋ผ์ ๋ฐ๋์ [์ธ์คํด์ค].displayName() ์ผ๋ก ํธ์ถ๋์ด์ผํ๋ค | |
| // ๊ทธ๋ ๊ฒ ํ์ง ๋ชปํ ๊ฒฝ์ฐ ์ธ์คํด์ค ๊ฐ์ฒด๋ฅผ ๋ฐ์ธ๋ฉ ์์ผ์ค์ผ์ผ this ๊ฐ ์ธ์คํด์ค ๊ฐ์ฒด๋ฅผ ๊ฐ๋ฅดํจ๋ค | |
| // ใด displayName.bind([์ธ์คํด์ค]) | |
| console.log(this.myname); |
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 * as actions from './actions'; | |
| import * as plugins from './plugins'; | |
| import myMiddleware from './middleware/mymiddleware'; | |
| import reducers from './reducers'; | |
| import views from './views'; | |
| export default { | |
| view: views.shopFinder, | |
| setup: function(app) { |
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
| const myview = Woowahan.View.create('bindExample', { | |
| initialize() { | |
| this.onDragend = this.onDragend.bind(this); | |
| this.super(); | |
| }, | |
| viewDidMount() { | |
| this.map.addListener(markerId, 'dragend', this.onDragend); |
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
| var pad = size => num => (Array(size-String(num).length+1)).join('0')+num; |