0

I am creating an web app in AngularJS. The purpose of the app is just a large information based app.

So within the app there are a lot of pages (40+).

Is it possible to create a JSON array of all pages and use that in the routing.

Instead of writing by hand each time:

.when('/standards', {
    templateUrl: 'pages/02_core_standards/index.html'
})

Or is there an even more efficient way?

Many thanks.

Kane Mitchell
  • 370
  • 2
  • 4
  • 12
  • Have you tried [this](http://stackoverflow.com/a/25872852/1230663) using ui-router? The other answers to that question are useful too – br3w5 Oct 22 '15 at 08:23
  • You can load routes from json file if you want. – dfsq Oct 22 '15 at 08:30

0 Answers0