Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorge07/leosangularroutingbundle
Adapting Angular UI-ROUTER to use it with Symfony
https://github.com/jorge07/leosangularroutingbundle
Last synced: about 2 months ago
JSON representation
Adapting Angular UI-ROUTER to use it with Symfony
- Host: GitHub
- URL: https://github.com/jorge07/leosangularroutingbundle
- Owner: jorge07
- Created: 2014-12-12T12:50:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-17T09:09:29.000Z (over 9 years ago)
- Last Synced: 2024-04-06T14:22:10.891Z (9 months ago)
- Language: PHP
- Size: 410 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LeosAngularRoutingBundle
========================Adapting Angular UI-ROUTER to use it with Symfony
Based on: https://github.com/angular-ui/ui-router
To configure:
Add on AppKernel in the array bundles:
========================new Leos\AngularRoutingBundle\LeosAngularRoutingBundle()
On your template:
========================
Add the link on your JS Block and replace **"my-mode"** for your module name, like this:The angular ui router
- @LeosAngularRoutingBundle/Resources/public/js/vendor/angular-ui-router.jsAdd to the routing.yml:
leos_angular_routing:
resource: "@LeosAngularRoutingBundle/Resources/config/routing.yml"prefix: /your-prefix
The custom configuration JS:
``On your config.yml or config_%env%.yml
Define your configuration site:
========================#The config:
leos_angular_routing:
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: testContainertestContainer.subrute:
url: my-list
templateUrl: todoDisplaytestContainer.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.jsUse it with: ng-controller="routing"
The Loading Bar:
========================
Based on: https://github.com/chieffancypants/angular-loading-bar
- @LeosAngularRoutingBundle/Resources/public/js/vendor/angular-loading-bar.js