# playframework.js **Repository Path**: steven0lisa/playframework.js ## Basic Information - **Project Name**: playframework.js - **Description**: 模仿playframework的js - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2014-04-30 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #playframework.js playframework.js is a MVC Framework for Javascript, which base on PlayFramework1 (Java). ##Basic Usage There are few steps to call playframework.js. Include lib: ```html ``` Create container: ```html
``` Add controller and action: ```js play.router.add('main',{ welcome: function(params){ play.Controller.render(params); } }); ``` Create template, set id like `{controller}_{action}` : ```html ``` Finally bootstrap and play: ```js play.run('#main', '#/main/welcome?username=steven0lisa'); ``` ##Dependencies - [Juicer](http://juicer.name/) - [jQuery](http://jquery.com/) ##Supports Chrome Tested, but should be ok in IE8+