Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fekit对vm的支持不完全 #38

Closed
malcolmyu opened this issue Apr 22, 2014 · 1 comment
Closed

fekit对vm的支持不完全 #38

malcolmyu opened this issue Apr 22, 2014 · 1 comment

Comments

@malcolmyu
Copy link

vm中的include和request.getParameter(获取页面URL)的方法fekit没有进行支持

@rinh
Copy link
Owner

rinh commented Dec 26, 2014

已实现 baa3545

request.getParameter 这个是 java 提供的功能,使用 vmjs 可以进行模拟

建立 index.vmjs 与 index.vm 放在同一目录下

index.vm

$request.getParameter("hoho")

<hr />

index.vmjs

module.exports = {
    "request" : {
        getParameter : function(key){
            return request.query[key];
        }
    }
};

访问的时候,以 http://127.0.0.1/index.vm?hoho=1 ,则模板就可以通过 request.getParameter("hoho") 得到 1 的值

@rinh rinh closed this as completed Dec 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants