2017 © Pedro Peláez
 

symfony-bundle angular-ng-routing-bundle

A way to expose your Symfony2 routing to Angular $resource service.

image

cypresslab/angular-ng-routing-bundle

A way to expose your Symfony2 routing to Angular $resource service.

  • Wednesday, June 25, 2014
  • by matteosister
  • Repository
  • 1 Watchers
  • 14 Stars
  • 98,515 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 7 Versions
  • 3 % Grown

The README.md

AngularNgRoutingBundle

Build Status, (*1)

A Symfony2 bundle to expose your routing in Angular.js resource format, (*2)

This bundle depends on FOSJsRoutingBundle, (*3)

Installation

``` json { "require": { "cypresslab/angular-ng-routing-bundle": "~1.0@dev" } }, (*4)


and enable the bundle in the kernel. Remember to publish assets with:

$ php app/console assets:install --symlink web #change this to your requirements, (*5)


##Usage Follow the [docs of FOSJsRoutingBundle](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/master/Resources/doc/index.md) You will add, at some point in your views, something like: ``` html+jinja <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, (*6)

``` html+jinja , (*7)


This will register in the global namespace an object named **NgRouting** You can use it like this: ``` javascript 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' } })

The Versions

25/06 2014

dev-master

9999999-dev

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js

25/06 2014

0.1.5

0.1.5.0

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js

17/06 2014

0.1.4

0.1.4.0

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js

13/06 2014

0.1.3

0.1.3.0

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js

06/03 2014

0.1.2

0.1.2.0

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js

04/03 2014

0.1.1

0.1.1.0

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js

09/02 2014

0.1.0

0.1.0.0

A way to expose your Symfony2 routing to Angular $resource service.

  Sources   Download

LGPL-3.0+

The Requires

 

javascript routing js routing angular.js