app.js 710 B

12345678910111213141516171819202122232425262728293031
  1. var myApp = angular.module('myApp',['ngRoute']);
  2. myApp.config(function($routeProvider){
  3. $routeProvider.when('/', {
  4. controller:'SearchController',
  5. templateUrl: 'views/search.html'
  6. })
  7. .when('/search', {
  8. controller:'SearchController',
  9. templateUrl: 'views/search.html'
  10. })
  11. .when('/apps',{
  12. controller:'AppsController',
  13. templateUrl: 'views/apps.html'
  14. })
  15. .when('/apps/:id',{
  16. controller:'AppsController',
  17. templateUrl: 'views/app.html'
  18. })
  19. .when('/download/:id',{
  20. controller:'DownloadController',
  21. templateUrl: 'views/download.html'
  22. })
  23. .when('/fetchreviews/:id',{
  24. controller:'FetchreviewsController',
  25. templateUrl: 'views/fetchreview.html'
  26. })
  27. .otherwise({
  28. redirectTo: '/'
  29. });
  30. });