Created
December 26, 2016 11:01
-
-
Save ilikerobots/4dc13cf75bf8d1df877fdfece1f50780 to your computer and use it in GitHub Desktop.
Building route definitions from SiteStructureService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<RouteDefinition> _getRouteConfig(List<ArticleSection> pages) { | |
| final List<RouteDefinition> config = <RouteDefinition>[]; | |
| for (int i = 0; i < pages.length; i++) { | |
| config.add( | |
| new Route(path: "/" + pages[i].routeSlug, | |
| name: pages[i].routeName, | |
| component: pages[i].component, | |
| data: <String,dynamic>{'id': pages[i].name})); | |
| } | |
| return config; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment