client/app/app.js
author cavaliet
Thu, 02 Oct 2014 13:24:57 +0200
changeset 1 74bbdd739878
parent 0 cef349423167
child 2 36ccc573af9a
permissions -rw-r--r--
views, path, search...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
(function(){
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
  'use strict';
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
1
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
     4
  angular.module('ammico', [ 'ngRoute','ammicoHome', 'ammicoGallery', 'ammicoSlideshow', 'ammicoSearch', 'templates' ])
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
    .config(function($routeProvider) {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
      $routeProvider.
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
        when('/', {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
        controller: 'homeCtrl',
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
        templateUrl: 'home/home.html'
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
      }).
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
      when('/gallery', {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
        controller: 'galleryCtrl',
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
        templateUrl: 'gallery/gallery.html'
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
      }).
1
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    15
      when('/slideshow/', {
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    16
          controller: 'slideshowCtrl',
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    17
          templateUrl: 'slideshow/slideshow.html'
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    18
        }).
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    19
      when('/slideshow/:iSlide', {
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
        controller: 'slideshowCtrl',
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        templateUrl: 'slideshow/slideshow.html'
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
      }).
1
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    23
      when('/search/', {
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    24
          controller: 'searchCtrl',
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    25
          templateUrl: 'search/search.html'
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    26
      }).
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    27
      when('/search/:q', {
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    28
          controller: 'searchCtrl',
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    29
          templateUrl: 'search/search.html'
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    30
      }).
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
      otherwise({
1
74bbdd739878 views, path, search...
cavaliet
parents: 0
diff changeset
    32
        redirectTo: '/'
0
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
      });
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
    })
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    // .config(function ($routeProvider) {
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
    //   $routeProvider
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    //     .otherwise({
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
    //       redirectTo: '/'
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    //   });
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    // });
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    .config(function($logProvider){
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
      $logProvider.debugEnabled(true);
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    });
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
cef349423167 add basic file org + client prototype
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
})();