2017 © Pedro Peláez
 

symfony-bundle angular-ui-routing-bundle

Adapting Angular UI-ROUTER to use it with Symfony2

image

leos/angular-ui-routing-bundle

Adapting Angular UI-ROUTER to use it with Symfony2

  • Wednesday, June 17, 2015
  • by jorge07
  • Repository
  • 1 Watchers
  • 2 Stars
  • 110 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony, (*1)

Based on: https://github.com/angular-ui/ui-router, (*2)

To configure:, (*3)

Add on AppKernel in the array bundles:

new Leos\AngularRoutingBundle\LeosAngularRoutingBundle(), (*4)

On your template:

Add the link on your JS Block and replace "my-mode" for your module name, like this:, (*5)

The angular ui router - @LeosAngularRoutingBundle/Resources/public/js/vendor/angular-ui-router.js, (*6)

Add to the routing.yml:, (*7)

leos_angular_routing:, (*8)

  resource: "@LeosAngularRoutingBundle/Resources/config/routing.yml"

  prefix:   /your-prefix

The custom configuration JS:, (*9)

<script src="{{ path('leos_angular_routing_v1', {"module": "my-mode"}) }}"></script>, (*10)

On your config.yml or config_%env%.yml, (*11)

Define your configuration site:

The config:

leos_angular_routing:, (*12)

routes:                                     

    home:                                   #The State Name
        url: ''                             #The url name (Not prefix with "/")

        #The template to include
        templateUrl: home                      #The symfony route name
        #Add parameters to the route
        urlParams:
            offer: wellcome
        #The childs
        views:
            partial1:                       #The partial name(unique)
                column: slider              #The column to insert the view
                viewParent: parnetSate      #Optional config to set nestead views
                templateUrl: slider         #The symfony route name
            #Other examamples
            partial2:
                column: aside
                templateUrl: todo

            partial3:
                column: content
                templateUrl: todoDisplay

    #To add Sub States
    testContainer:
        url: lobby
        templateUrl: testContainer

    testContainer.subrute:
        url: my-list
        templateUrl: todoDisplay

    testContainer.account:
        url: my-account
        templateUrl: testContainer.account
    #OR
    testContainer:
        url: lobby
        templateUrl: testContainer
        childs:
            subrute:
                url: my-list
                templateUrl: todoDisplay
                childs:
                      cagada:
                          url: cagada
                          templateUrl: todoDisplay
            account:
                url: my-account
                templateUrl: testContainer.account

    #To add states with parameters
    play:
        url: 'play/:gameId'
        templateUrl: game

Extra Content:

The Routing controller for test your application:

Add it only if you want debug the router - @LeosAngularRoutingBundle/Resources/public/js/Controller/RoutingController.js, (*13)

Use it with: ng-controller="routing", (*14)

The Loading Bar:

Based on: https://github.com/chieffancypants/angular-loading-bar, (*15)

  • @LeosAngularRoutingBundle/Resources/public/js/vendor/angular-loading-bar.js

The Versions

17/06 2015

0.1.57.x-dev

0.1.57.9999999-dev https://github.com/jorge07/LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony2 angularjs symfony symfony 2 angular ui-router angular ui

17/06 2015

dev-master

9999999-dev https://github.com/jorge07/LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony2 angularjs symfony symfony 2 angular ui-router angular ui

17/06 2015

dev-dev

dev-dev https://github.com/jorge07/LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony2 angularjs symfony symfony 2 angular ui-router angular ui

17/06 2015

0.1.56.x-dev

0.1.56.9999999-dev https://github.com/jorge07/LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony2 angularjs symfony symfony 2 angular ui-router angular ui

23/04 2015

0.1.55.x-dev

0.1.55.9999999-dev https://github.com/jorge07/LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony2 angularjs symfony symfony 2 angular ui-router angular ui

19/12 2014

0.1.54.x-dev

0.1.54.9999999-dev https://github.com/jorge07/LeosAngularRoutingBundle

Adapting Angular UI-ROUTER to use it with Symfony2

  Sources   Download

MIT

The Requires

 

The Development Requires

symfony2 angularjs symfony symfony 2 angular ui-router angular ui