Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Angular Ng Routing Bundle Laravel Package

cypresslab/angular-ng-routing-bundle

View on GitHub
Deep Wiki
Context7

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

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel