http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/auth/services/auth-token.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/auth/services/auth-token.js 
b/rave-portal-ng/src/subapps/auth/services/auth-token.js
deleted file mode 100644
index f2ef420..0000000
--- a/rave-portal-ng/src/subapps/auth/services/auth-token.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * token
- * Manages our authentication token, which is stored
- * in a cookie.
- *
- */
-
-define(function(require) {
-  var auth = require('../auth');
-
-  // The name of our cookie
-  var COOKIE_NAME = 'raveToken';
-
-  // If they choose to be remembered, it will
-  // last for 20 years.
-  var EXPIRE_DAYS = 20 * 365;
-
-  // Checks if we're registered or not with the API.
-  // It only checks on the first request to save on bandwidth.
-  // One day we'll make an HTTP request in here
-  auth.factory('authToken', [
-    'ipCookie', '$rootScope',
-    function(ipCookie, $rootScope) {
-
-      return {
-
-        // Gets your token from the cookies
-        get: function() {
-          return ipCookie(COOKIE_NAME);
-        },
-
-        // Sets the new token value, then emits an associated event
-        set: function(newValue, persist) {
-          var expireDays = persist ? EXPIRE_DAYS : undefined;
-          ipCookie(COOKIE_NAME, newValue, {expires: expireDays});
-          $rootScope.$emit('set:' + COOKIE_NAME, newValue, persist);
-        },
-
-        // Destroys the token, then emits an associated event
-        destroy: function() {
-          ipCookie.remove(COOKIE_NAME);
-          $rootScope.$emit('destroy:' + COOKIE_NAME);
-        }
-      };
-    }
-  ]);
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/auth/services/location-cache.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/auth/services/location-cache.js 
b/rave-portal-ng/src/subapps/auth/services/location-cache.js
deleted file mode 100644
index eca88e6..0000000
--- a/rave-portal-ng/src/subapps/auth/services/location-cache.js
+++ /dev/null
@@ -1,10 +0,0 @@
-define(function(require) {
-  var auth = require('../auth');
-
-  auth.factory('locationCache', [
-    '$cacheFactory',
-    function($cacheFactory) {
-      return $cacheFactory('location-cache');
-    }
-  ]);
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/auth/services/security.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/auth/services/security.js 
b/rave-portal-ng/src/subapps/auth/services/security.js
deleted file mode 100644
index 16f484d..0000000
--- a/rave-portal-ng/src/subapps/auth/services/security.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * securityService
- * This is our single point-of-entry for authentication in our app. It exposes
- * all of the methods our app needs to handle authentication.
- * 
- * Given the nature of authentication these services are typically related to 
routing.
- *
- * It provides three services
- *
- * 1. Attempts to log the user in with the given credentials
- * 2. Determines if our user is verified (with a cached server response)
- * 3. Logs out the user
- * 
- */
-
-define(function(require) {
-  var auth = require('../auth');
-  require('./auth-api');
-  require('./auth-cache');
-  require('./auth-token');
-  require('./location-cache');
-
-  auth.factory('security', [
-    '$rootScope', 'authToken', '$q', 'authApi', 'authCache', '$state', 
'locationCache',
-    function($rootScope, authToken, $q, authApi, authCache, $state, 
locationCache) {
-      return {
-
-        // Returns a promise that resolves true or rejects false.
-        // This promise represents whether the user is currently verified.
-        // If the token is stored in a cookie, it checks if we've been verified
-        // with the server for this session. If we have, it resolves true.
-        // If we haven't, it checks the token with the server. If the server 
returns
-        // false, then the token is destroyed.
-        verify: function() {
-          var myToken = authToken.get();
-          var response = $q.defer();
-
-          // If we're verified, then we can move along.
-          if (myToken && authCache.get('verified') === true) {
-            response.resolve(true);
-          }
-
-          // If we have no token or aren't verified, then we reject it.
-          else if (myToken === null || authCache.get('verified') === false) {
-            response.reject(false);
-          }
-
-          // Lastly, we verify with the server using our token
-          else {
-            authApi.verify(myToken)
-              .then(function(res) {
-                $rootScope.authenticated = true;
-                authCache.put('verified', true);
-                response.resolve(true);
-              })
-              .catch(function(err) {
-                authToken.destroy();
-                response.reject(false);
-              });
-          }
-          return response.promise;
-        },
-
-        // Log us in with the credentials
-        // Returns the XHR result of the login attempt.
-        // Errors aren't handled within this method.
-        login: function(credentials) {
-
-          return authApi.login(credentials)
-
-            // On success, we do quite a few things. We set that we're
-            // verified on the $rootScope, we cache our verification,
-            // we set our token, and lastly we 
-            .then(function(res) {
-              var user = res.data.user;
-              $rootScope.authenticated = true;
-              authCache.put('verified', true);
-              authToken.set(user.token, credentials.remember);
-
-              var toState = locationCache.get('toState') || 'portal.home';
-              var toParams = locationCache.get('toParams') || undefined;
-
-              locationCache.removeAll();
-
-              $state.transitionTo(toState, toParams);
-            });
-        },
-
-        // Logs us out.
-        logout: function() {
-          $rootScope.authenticated = false;
-          authCache.put('verified', false);
-          authToken.destroy();
-          $state.transitionTo('portal.login');
-        },
-      };
-    }
-  ]);
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/home-controller.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/home-controller.js 
b/rave-portal-ng/src/subapps/home/home-controller.js
deleted file mode 100644
index 9ac70e0..0000000
--- a/rave-portal-ng/src/subapps/home/home-controller.js
+++ /dev/null
@@ -1,25 +0,0 @@
-define(function(require) {
-  require('./home');
-  
-  var angular = require('angular');
-
-  angular.module('home').controller('homeController', function($http) {
-    /*
-    var data = {
-       headers: {
-               'Authorization': 'Basic 9pe3labzk09v718atvivjnmy8b513k4u'
-       },
-      data: {
-        values: 20
-      },
-      url: '/api/v1/preference/pageSize',
-      method: 'PUT'
-    };
-    $http(data).then( function(data, responseCode, headers, config) {
-      console.log('data', data);
-    }).catch( function(err) {
-      console.log('err', err);
-    } );
-    */
-  });
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/home.html
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/home.html 
b/rave-portal-ng/src/subapps/home/home.html
deleted file mode 100644
index 714e9f3..0000000
--- a/rave-portal-ng/src/subapps/home/home.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<h1 class="home">Welcome {{ user.name }}</h1>
-<hr>

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/home.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/home.js 
b/rave-portal-ng/src/subapps/home/home.js
index d11b520..c8721aa 100644
--- a/rave-portal-ng/src/subapps/home/home.js
+++ b/rave-portal-ng/src/subapps/home/home.js
@@ -1,3 +1,28 @@
+/*
+ * home
+ * The most important part of your Rave: your home page. This subapp
+ * handles displaying your widgets.
+ *
+ */
+
 define(function(require) {
-  return require('angular').module('home', []);
+  var ng = require('angular');
+
+  // Ensure that our dependencies are loaded
+  require('uiRouter');
+
+  // Put our dependencies into an array for Angular's dependency injection
+  var homeDependencies = [
+    'ui.router'
+  ];
+
+  // Create our subapp as a module
+  var home = ng.module('home', homeDependencies);
+
+  // Register our routes for this subapp
+  var routes = require('./routes');
+  home.config(routes);
+
+  // Return the module
+  return home;
 });

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/home.less
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/home.less 
b/rave-portal-ng/src/subapps/home/home.less
deleted file mode 100644
index bc9fe79..0000000
--- a/rave-portal-ng/src/subapps/home/home.less
+++ /dev/null
@@ -1,5 +0,0 @@
-@import 'global-imports';
-
-h1.home {
-  background: #fff;
-}

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/index.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/index.js 
b/rave-portal-ng/src/subapps/home/index.js
deleted file mode 100644
index 1059189..0000000
--- a/rave-portal-ng/src/subapps/home/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-define(function(require) {
-  require('./home');
-  require('./home-controller');
-  require('./routes');
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/routes.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/routes.js 
b/rave-portal-ng/src/subapps/home/routes.js
index fa0d36e..f97994d 100644
--- a/rave-portal-ng/src/subapps/home/routes.js
+++ b/rave-portal-ng/src/subapps/home/routes.js
@@ -1,11 +1,15 @@
-define(function(require) {
-  require('./home');
-  
-  var angular = require('angular');
+/*
+ * routes
+ * Routes for this subapp. Rave uses the Angular-UI UI-Router
+ * library for routing, so be sure to familiarize yourself
+ * with that library.
+ *
+ */
 
-  angular.module('home').config([
-    '$stateProvider', '$urlRouterProvider',
+define(function(require) {
+  return ['$stateProvider', '$urlRouterProvider',
     function($stateProvider, $urlRouterProvider) {
+
       // Make this our default route
       $urlRouterProvider.otherwise('/portal/home');
 
@@ -14,10 +18,9 @@ define(function(require) {
       // the url '/portal' correspond to our home state.
       $stateProvider.state('portal.home', {
         url: '/home',
-        controller: 'homeController',
-        templateUrl: '/subapps/home/home.html',
+        templateUrl: '/subapps/home/templates/home.html',
         authenticate: true
       });
     }
-  ]);
+  ];
 });

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/home/templates/home.html
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/home/templates/home.html 
b/rave-portal-ng/src/subapps/home/templates/home.html
new file mode 100644
index 0000000..714e9f3
--- /dev/null
+++ b/rave-portal-ng/src/subapps/home/templates/home.html
@@ -0,0 +1,2 @@
+<h1 class="home">Welcome {{ user.name }}</h1>
+<hr>

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/profile/index.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/profile/index.js 
b/rave-portal-ng/src/subapps/profile/index.js
deleted file mode 100644
index f98a767..0000000
--- a/rave-portal-ng/src/subapps/profile/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-define(function(require) {
-  require('./profile');
-  require('./my-directive');
-  require('./routes');
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/profile/my-directive.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/profile/my-directive.js 
b/rave-portal-ng/src/subapps/profile/my-directive.js
deleted file mode 100644
index 59bb186..0000000
--- a/rave-portal-ng/src/subapps/profile/my-directive.js
+++ /dev/null
@@ -1,12 +0,0 @@
-define(function(require) {
-  require('./profile');
-  
-  var angular = require('angular');
-  
-  return angular.module('profile').directive('myDir', function() {
-    return {
-      restrict: 'E',
-      template: 'Directive loaded!'
-    };
-  });
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/profile/profile.html
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/profile/profile.html 
b/rave-portal-ng/src/subapps/profile/profile.html
deleted file mode 100644
index 771acdc..0000000
--- a/rave-portal-ng/src/subapps/profile/profile.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<h1>Profile</h1>
-<hr>
-<my-dir>My directive</my-dir>

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/profile/profile.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/profile/profile.js 
b/rave-portal-ng/src/subapps/profile/profile.js
index 8fba7ab..b3c42b0 100644
--- a/rave-portal-ng/src/subapps/profile/profile.js
+++ b/rave-portal-ng/src/subapps/profile/profile.js
@@ -1,3 +1,29 @@
+/*
+ * profile
+ * The sub-application module for our Profile. The profile
+ * lets you view and change your information, and also manage
+ * your relationships.
+ *
+ */
+
 define(function(require) {
-  return require('angular').module('profile', []);
+  var ng = require('angular');
+
+  // Ensure that our dependencies are loaded
+  require('uiRouter');
+
+  // Create an array of our dependencies for DI
+  var profileDependencies = [
+    'ui.router'
+  ];
+
+  // Create the profile module
+  var profile = ng.module('profile', profileDependencies);
+
+  // Register our route states for the ui-router
+  var routes = require('./routes');
+  profile.config(routes);
+
+  // Return the profile
+  return profile;
 });

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/profile/routes.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/profile/routes.js 
b/rave-portal-ng/src/subapps/profile/routes.js
index 0a98470..0e91abf 100644
--- a/rave-portal-ng/src/subapps/profile/routes.js
+++ b/rave-portal-ng/src/subapps/profile/routes.js
@@ -1,17 +1,21 @@
+/*
+ * routes
+ * Routes for this subapp. Rave uses the Angular-UI UI-Router
+ * library for routing, so be sure to familiarize yourself
+ * with that library.
+ *
+ */
+
 define(function(require) {
-  require('./profile');
-  
-  var angular = require('angular');
-  
-  angular.module('profile').config([
-    '$stateProvider', '$urlRouterProvider',
+  return ['$stateProvider', '$urlRouterProvider',
     function($stateProvider, $urlRouterProvider) {
-      // Our profile states
+
+      // Our profile states. This is configuration from Angular's ui-router.
       $stateProvider.state('portal.profile', {
         url: '/profile',
-        templateUrl: '/subapps/profile/profile.html',
+        templateUrl: '/subapps/profile/templates/profile.html',
         authenticate: true
       });
     }
-  ]);
+  ];
 });

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/profile/templates/profile.html
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/profile/templates/profile.html 
b/rave-portal-ng/src/subapps/profile/templates/profile.html
new file mode 100644
index 0000000..771acdc
--- /dev/null
+++ b/rave-portal-ng/src/subapps/profile/templates/profile.html
@@ -0,0 +1,3 @@
+<h1>Profile</h1>
+<hr>
+<my-dir>My directive</my-dir>

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/widget-store/index.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/widget-store/index.js 
b/rave-portal-ng/src/subapps/widget-store/index.js
deleted file mode 100644
index 5a597fc..0000000
--- a/rave-portal-ng/src/subapps/widget-store/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-define(function(require) {
-  require('./widget-store');
-  require('./routes');
-});

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/widget-store/routes.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/widget-store/routes.js 
b/rave-portal-ng/src/subapps/widget-store/routes.js
index c799270..442b9b0 100644
--- a/rave-portal-ng/src/subapps/widget-store/routes.js
+++ b/rave-portal-ng/src/subapps/widget-store/routes.js
@@ -1,16 +1,21 @@
+/*
+ * routes
+ * Routes for this subapp. Rave uses the Angular-UI UI-Router
+ * library for routing, so be sure to familiarize yourself
+ * with that library.
+ *
+ */
+ 
 define(function(require) {
-  require('./widget-store');
-  
-  var angular = require('angular');
-  
-  angular.module('widget-store').config([
-    '$stateProvider', '$urlRouterProvider',
+  return ['$stateProvider', '$urlRouterProvider',
     function($stateProvider, $urlRouterProvider) {
+
+      // Our widget store states. This is configuration from Angular's 
ui-router.
       $stateProvider.state('portal.widgetStore', {
         url: '/app/widget-store',
-        templateUrl: '/subapps/widget-store/widget-store.html',
+        templateUrl: '/subapps/widget-store/templates/widget-store.html',
         authenticate: true
       });
     }
-  ]);
+  ];
 });

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/widget-store/templates/widget-store.html
----------------------------------------------------------------------
diff --git 
a/rave-portal-ng/src/subapps/widget-store/templates/widget-store.html 
b/rave-portal-ng/src/subapps/widget-store/templates/widget-store.html
new file mode 100644
index 0000000..ffad189
--- /dev/null
+++ b/rave-portal-ng/src/subapps/widget-store/templates/widget-store.html
@@ -0,0 +1,119 @@
+<section class="span8 pagination-header">
+<h2>Showing 1 - 10 of 30 widgets</h2>
+<div class="pagination">
+  <ul>
+    <li class="active"><a href="#">1</a></li>
+    <li><a href="?offset=10&amp;referringPageId=1">2</a></li>
+    <li><a href="?offset=20&amp;referringPageId=1">3</a></li>
+    <li><a href="?offset=10&amp;referringPageId=1">&gt;</a></li>
+  </ul>
+</div>
+  <ul id="storeItems" class="storeItems">
+    <li class="storeItem storeItemFeatured">
+      <div class="widget-title-bar">
+        Activity Stream
+      </div>
+      <div class="storeItemLeft">
+        <div id="widgetAdded_17" class="storeButton">
+          <button class="btn btn-small btn-primary widgetAddButton" 
id="addWidget_17" data-widget-id="17" data-referring-page-id="1" 
data-success="Added to Page">
+            Add to Page
+          </button>
+        </div>
+      </div>
+      <div class="storeItemCenter">
+          <h4><a id="widget-17-title" class="secondaryPageItemTitle" 
href="/portal/app/store/widget/17?referringPageId=1">
+              Activity Stream</a>
+          </h4>
+          <div class="storeWidgetAuthor">Author: OpenSocial Foundation</div>
+          <div class="storeWidgetDesc">OpenSocial Activity Stream gadget with 
support for Embedded Experiences...</div>
+          <div class="clearfix">
+            <div class="widgetRating">
+              <strong>Rate:</strong>
+              <form class="hidden">
+                <input type="hidden" id="rate-17" value="-1">
+              </form>
+              <div class="ratingCounts">
+                <span class="widgetLikeCount" style="width: 47px;">
+                  <span id="totalLikes-17" data-rave-widget-likes="0">
+                    <span class="like-text">0</span>
+                  </span>
+                  <i class="icon-thumbs-up" title="0&nbsp;people like this 
widget"></i>
+                </span>
+                <span class="widgetDislikeCount" style="width: 63px;">
+                  <span id="totalDislikes-17" data-rave-widget-dislikes="0">
+                    <span class="dislike-text">0</span>
+                  </span>
+                  <i class="icon-thumbs-down" title="0&nbsp;people dislike 
this widget"></i>
+                </span>
+              </div>
+              <div id="rating-17" class="ratingButtons" 
data-toggle="buttons-radio">
+                <button id="like-17" class="widgetLikeButton btn btn-mini " 
name="rating-17">
+                  I
+                <span>like</span>it</button>
+                <button id="dislike-17" class="widgetDislikeButton btn 
btn-mini " name="rating-17">
+                  I
+                <span>dislike</span>it</button>
+              </div>
+            </div>
+          </div>
+          <div class="clearfix"></div>
+          <span class="widgetUserCount">
+            <a href="javascript:void(0);" class="displayUsersLink" 
data-widget-id="17">
+              1&nbsp;users
+            </a>
+          </span>
+      </div>
+      <div class="clear-float"></div>
+    </li>
+  </ul>
+
+  <div class="pagination">
+    <ul>
+      <li class="active"><a href="#">1</a></li>
+      <li><a href="?offset=10&amp;referringPageId=1">2</a></li>
+      <li><a href="?offset=20&amp;referringPageId=1">3</a></li>
+      <li><a href="?offset=10&amp;referringPageId=1">&gt;</a></li>
+    </ul>
+  </div>
+</section>
+
+<section class="span4">
+  <form class="form-inline" action="/portal/app/store/search" method="GET">
+    <fieldset>
+      <legend style="margin-bottom: 0;">Search in widget store</legend>
+      <div class="control-group" style="margin-bottom: 18px;">
+        <div class="input-append">
+          <input type="search" id="searchTerm" name="searchTerm" value="">
+          <button class="btn btn-primary" type="submit" 
value="Search">Search</button>
+        </div>
+      </div>
+      <legend>Filter Widget Store</legend>
+      <div class="control-group">
+        <label class="control-label" for="categoryList">By Category:</label>
+        <div class="controls">
+          <select name="categoryList" id="categoryList" class="x-large">
+            <option value="0"></option>
+            <option value="5">
+              Communications
+            </option>
+            <option value="2">
+              News
+            </option>
+            <option value="4">
+              Projects
+            </option>
+            <option value="1">
+              Technology
+            </option>
+            <option value="3">
+              Travel
+            </option>
+          </select>
+        </div>
+      </div>
+    </fieldset>
+  </form>
+  <a href="/portal/app/store/mine?referringPageId=1">My Widgets</a>
+  <br>
+  <a href="/portal/app/store?referringPageId=1">All Widgets</a>
+</section>

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/widget-store/widget-store.html
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/widget-store/widget-store.html 
b/rave-portal-ng/src/subapps/widget-store/widget-store.html
deleted file mode 100644
index ffad189..0000000
--- a/rave-portal-ng/src/subapps/widget-store/widget-store.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<section class="span8 pagination-header">
-<h2>Showing 1 - 10 of 30 widgets</h2>
-<div class="pagination">
-  <ul>
-    <li class="active"><a href="#">1</a></li>
-    <li><a href="?offset=10&amp;referringPageId=1">2</a></li>
-    <li><a href="?offset=20&amp;referringPageId=1">3</a></li>
-    <li><a href="?offset=10&amp;referringPageId=1">&gt;</a></li>
-  </ul>
-</div>
-  <ul id="storeItems" class="storeItems">
-    <li class="storeItem storeItemFeatured">
-      <div class="widget-title-bar">
-        Activity Stream
-      </div>
-      <div class="storeItemLeft">
-        <div id="widgetAdded_17" class="storeButton">
-          <button class="btn btn-small btn-primary widgetAddButton" 
id="addWidget_17" data-widget-id="17" data-referring-page-id="1" 
data-success="Added to Page">
-            Add to Page
-          </button>
-        </div>
-      </div>
-      <div class="storeItemCenter">
-          <h4><a id="widget-17-title" class="secondaryPageItemTitle" 
href="/portal/app/store/widget/17?referringPageId=1">
-              Activity Stream</a>
-          </h4>
-          <div class="storeWidgetAuthor">Author: OpenSocial Foundation</div>
-          <div class="storeWidgetDesc">OpenSocial Activity Stream gadget with 
support for Embedded Experiences...</div>
-          <div class="clearfix">
-            <div class="widgetRating">
-              <strong>Rate:</strong>
-              <form class="hidden">
-                <input type="hidden" id="rate-17" value="-1">
-              </form>
-              <div class="ratingCounts">
-                <span class="widgetLikeCount" style="width: 47px;">
-                  <span id="totalLikes-17" data-rave-widget-likes="0">
-                    <span class="like-text">0</span>
-                  </span>
-                  <i class="icon-thumbs-up" title="0&nbsp;people like this 
widget"></i>
-                </span>
-                <span class="widgetDislikeCount" style="width: 63px;">
-                  <span id="totalDislikes-17" data-rave-widget-dislikes="0">
-                    <span class="dislike-text">0</span>
-                  </span>
-                  <i class="icon-thumbs-down" title="0&nbsp;people dislike 
this widget"></i>
-                </span>
-              </div>
-              <div id="rating-17" class="ratingButtons" 
data-toggle="buttons-radio">
-                <button id="like-17" class="widgetLikeButton btn btn-mini " 
name="rating-17">
-                  I
-                <span>like</span>it</button>
-                <button id="dislike-17" class="widgetDislikeButton btn 
btn-mini " name="rating-17">
-                  I
-                <span>dislike</span>it</button>
-              </div>
-            </div>
-          </div>
-          <div class="clearfix"></div>
-          <span class="widgetUserCount">
-            <a href="javascript:void(0);" class="displayUsersLink" 
data-widget-id="17">
-              1&nbsp;users
-            </a>
-          </span>
-      </div>
-      <div class="clear-float"></div>
-    </li>
-  </ul>
-
-  <div class="pagination">
-    <ul>
-      <li class="active"><a href="#">1</a></li>
-      <li><a href="?offset=10&amp;referringPageId=1">2</a></li>
-      <li><a href="?offset=20&amp;referringPageId=1">3</a></li>
-      <li><a href="?offset=10&amp;referringPageId=1">&gt;</a></li>
-    </ul>
-  </div>
-</section>
-
-<section class="span4">
-  <form class="form-inline" action="/portal/app/store/search" method="GET">
-    <fieldset>
-      <legend style="margin-bottom: 0;">Search in widget store</legend>
-      <div class="control-group" style="margin-bottom: 18px;">
-        <div class="input-append">
-          <input type="search" id="searchTerm" name="searchTerm" value="">
-          <button class="btn btn-primary" type="submit" 
value="Search">Search</button>
-        </div>
-      </div>
-      <legend>Filter Widget Store</legend>
-      <div class="control-group">
-        <label class="control-label" for="categoryList">By Category:</label>
-        <div class="controls">
-          <select name="categoryList" id="categoryList" class="x-large">
-            <option value="0"></option>
-            <option value="5">
-              Communications
-            </option>
-            <option value="2">
-              News
-            </option>
-            <option value="4">
-              Projects
-            </option>
-            <option value="1">
-              Technology
-            </option>
-            <option value="3">
-              Travel
-            </option>
-          </select>
-        </div>
-      </div>
-    </fieldset>
-  </form>
-  <a href="/portal/app/store/mine?referringPageId=1">My Widgets</a>
-  <br>
-  <a href="/portal/app/store?referringPageId=1">All Widgets</a>
-</section>

http://git-wip-us.apache.org/repos/asf/rave/blob/277e58a4/rave-portal-ng/src/subapps/widget-store/widget-store.js
----------------------------------------------------------------------
diff --git a/rave-portal-ng/src/subapps/widget-store/widget-store.js 
b/rave-portal-ng/src/subapps/widget-store/widget-store.js
index 03430f5..1a33d86 100644
--- a/rave-portal-ng/src/subapps/widget-store/widget-store.js
+++ b/rave-portal-ng/src/subapps/widget-store/widget-store.js
@@ -1,3 +1,28 @@
+/*
+ * widgetStore
+ * The sub-application module for our WidgetStore. This is where you
+ * can peruse the available Rave widgets for your Rave installation.
+ *
+ */
+
 define(function(require) {
-  return require('angular').module('widget-store', []);
+  var ng = require('angular');
+
+  // Ensure that our dependencies are loaded
+  require('uiRouter');
+
+  // An array of our dependencies for Angular's dependency injection
+  var widgetStoreDeps = [
+    'ui.router'
+  ];
+
+  // Create our subapp as a module
+  var widgetStore = ng.module('widgetStore', widgetStoreDeps);
+
+  // Set up our routes for the ui-router
+  var routes = require('./routes');
+  widgetStore.config(routes);
+
+  // Return the module
+  return widgetStore;
 });

Reply via email to