cypresslab/angular-ng-routing-bundle
最新稳定版本:0.1.5
Composer 安装命令:
composer require cypresslab/angular-ng-routing-bundle
包简介
A way to expose your Symfony2 routing to Angular $resource service.
README 文档
README
#AngularNgRoutingBundle
A Symfony2 bundle to expose your routing in Angular.js resource format
This bundle depends on FOSJsRoutingBundle
##Installation
{
"require": {
"cypresslab/angular-ng-routing-bundle": "~1.0@dev"
}
}
and enable the bundle in the kernel. Remember to publish assets with:
$ php app/console assets:install --symlink web #change this to your requirements
##Usage
Follow the docs of FOSJsRoutingBundle
You will add, at some point in your views, something like:
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script> <script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>
Just add these two more lines
<script src="{{ asset('bundles/cypressangularngrouting/ng-router.js') }}"></script> <script src="{{ path('fos_js_routing_js', {"callback": "cypress.NgRouter.setData"}) }}"></script>
This will register in the global namespace an object named NgRouting
You can use it like this:
var url = NgRouting.generateResourceUrl('api_saves_get_documents'); // url now is something like: /app_dev.php/saves/:id var resource = $resource(url, { id: 2 }, { 'create': { method: 'PUT' } })
cypresslab/angular-ng-routing-bundle 适用场景与选型建议
cypresslab/angular-ng-routing-bundle 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 137k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2014 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「routing」 「Js Routing」 「javascript」 「angular.js」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cypresslab/angular-ng-routing-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cypresslab/angular-ng-routing-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cypresslab/angular-ng-routing-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.
Caching and compression for Twig assets (JavaScript and CSS).
A pretty nice way to expose your translation messages to your JavaScript.
Write down your routing mapping at one place
Flight routing is a simple, fast PHP router that is easy to get integrated with other routers.
PHP client for the Google Closure Compiler API in one file.
统计信息
- 总下载量: 137k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2014-02-09