bravo3/spa-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bravo3/spa-bundle

最新稳定版本:0.1.1

Composer 安装命令:

composer require bravo3/spa-bundle

包简介

Symfony 2 bundle to create a SPA web application

README 文档

README

This bundle enables you to turn any normal Symfony 2 application into a 'SPA' application, causing the first page load to be rendered normally and all consequtive page hits to be loaded via XHR.

Page content is broken into "blocks", only required blocks of the main site layout will be re-rendered.

This bundle requires your application to use Twig rendering, only minor changes to the controller are required:

class HomeController extends AbstractSpaController
{
    /**
     * @Route("/", name="home")
     * @param Request $request
     * @return Response
     */
    public function homeAction(Request $request)
    {
        // .. 
        
        // Call the AbstractSpaController#render() function to trigger the SPA engine -
        return $this->render('@MySiteBundle/Home/home.html.twig', ['param' => 'value']);
    }
}

统计信息

  • 总下载量: 74
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-06