承接 cypresslab/angular-ng-routing-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

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

Build Status

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' } })

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2014-02-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固