Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rrajkowski/heroku-app
base: ffc61a5ee6
...
head fork: rrajkowski/heroku-app
compare: dea5b39ab4
  • 2 commits
  • 14 files changed
  • 0 commit comments
  • 1 contributor
1  heroku-app
@@ -1 +0,0 @@
-Subproject commit c3efabd9f1fbb792e8d61718f1dc27c4afc99535
View
116 movies.csv
116 additions, 0 deletions not shown
View
26 npm-debug.log
@@ -1,26 +0,0 @@
-0 info it worked if it ends with ok
-1 verbose cli [ 'node', '/usr/local/bin/npm', 'init', 'movies' ]
-2 info using npm@1.4.3
-3 info using node@v0.10.26
-4 silly package data undefined
-5 info init written successfully
-6 error Error: canceled
-6 error at Interface.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read/lib/read.js:66:13)
-6 error at Interface.EventEmitter.emit (events.js:92:17)
-6 error at Interface._ttyWrite (readline.js:620:16)
-6 error at ReadStream.onkeypress (readline.js:99:10)
-6 error at ReadStream.EventEmitter.emit (events.js:98:17)
-6 error at emitKey (readline.js:1095:12)
-6 error at ReadStream.onData (readline.js:840:14)
-6 error at ReadStream.EventEmitter.emit (events.js:95:17)
-6 error at ReadStream.<anonymous> (_stream_readable.js:746:14)
-6 error at ReadStream.EventEmitter.emit (events.js:92:17)
-7 error If you need help, you may report this *entire* log,
-7 error including the npm and node versions, at:
-7 error <http://github.com/npm/npm/issues>
-8 error System Darwin 14.0.0
-9 error command "node" "/usr/local/bin/npm" "init" "movies"
-10 error cwd /Users/rajkowskiruben/Documents/MEAN/heroku-app
-11 error node -v v0.10.26
-12 error npm -v 1.4.3
-13 verbose exit [ 1, true ]
View
26 packages/npm-debug.log
@@ -1,26 +0,0 @@
-0 info it worked if it ends with ok
-1 verbose cli [ 'node', '/usr/local/bin/npm', 'init', 'movies' ]
-2 info using npm@1.4.3
-3 info using node@v0.10.26
-4 silly package data undefined
-5 info init written successfully
-6 error Error: canceled
-6 error at Interface.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read/lib/read.js:66:13)
-6 error at Interface.EventEmitter.emit (events.js:92:17)
-6 error at Interface._ttyWrite (readline.js:620:16)
-6 error at ReadStream.onkeypress (readline.js:99:10)
-6 error at ReadStream.EventEmitter.emit (events.js:98:17)
-6 error at emitKey (readline.js:1095:12)
-6 error at ReadStream.onData (readline.js:840:14)
-6 error at ReadStream.EventEmitter.emit (events.js:95:17)
-6 error at ReadStream.<anonymous> (_stream_readable.js:746:14)
-6 error at ReadStream.EventEmitter.emit (events.js:92:17)
-7 error If you need help, you may report this *entire* log,
-7 error including the npm and node versions, at:
-7 error <http://github.com/npm/npm/issues>
-8 error System Darwin 14.0.0
-9 error command "node" "/usr/local/bin/npm" "init" "movies"
-10 error cwd /Users/rajkowskiruben/Documents/MEAN/heroku-app/packages
-11 error node -v v0.10.26
-12 error npm -v 1.4.3
-13 verbose exit [ 1, true ]
View
13 public/movies/controllers/movies.js 100644 → 100755
@@ -1,7 +1,7 @@
'use strict';
var moviesCnt = angular.module('mean.movies').controller('MoviesController', ['$scope', '$stateParams', '$location', 'Global', 'Movies', function ($scope, $stateParams, $location, Global, Movies) {
-
+ console.log('MoviesController');
// Set globals
$scope.global = Global;
$scope.movies = [];
@@ -38,7 +38,7 @@ var moviesCnt = angular.module('mean.movies').controller('MoviesController', ['$
$scope.setFilter = function(){
//console.log($scope.critics_score +', '+ $scope.mpaa_rating);
Movies.query(function(movies){
- var filtered = [];
+ $scope.filtered = [];
if(movies.length > 0){
for(var i = 0; i < movies.length; i++){
// set default score to 75
@@ -48,16 +48,17 @@ var moviesCnt = angular.module('mean.movies').controller('MoviesController', ['$
var $ratings = movies[i].ratings;
if(movies[i].mpaa_rating === $scope.mpaa_rating){
if($ratings.critics_score >= $scope.critics_score){
- filtered.push(movies[i]);
+ $scope.filtered.push(movies[i]);
}
}
- $scope.movies = filtered;
- $scope.pageSize = filtered.length;
+ $scope.movies = $scope.filtered;
+ $scope.pageSize = $scope.filtered.length;
}
}else{
//no results
- movies = [], filtered = [];
+ $scope.movies = [];
+ $scope.filtered = [];
$scope.pageSize = 0;
$scope.itemsPerPage = 0;
}
View
5 public/movies/routes/movies.js 100644 → 100755
@@ -4,12 +4,13 @@
angular.module('mean.movies').config(['$stateProvider',
function($stateProvider) {
// do some authorization stuff
-
+ console.log('movies route');
// states for my app
$stateProvider
.state('all movies', {
url: '/movies',
- templateUrl: 'public/movies/views/movies.html'
+ controller: 'MoviesController',
+ templateUrl: '/public/movies/views/movies.html'
});
}
]);
View
2  public/movies/services/movies.js 100644 → 100755
@@ -1,6 +1,6 @@
'use strict';
-//Articles service used for articles REST endpoint
+//Articles service used for movies REST endpoint
angular.module('mean.movies').factory('Movies', ['$resource', function($resource) {
return $resource('movies');
}]);
View
2  public/system/controllers/index.js
@@ -2,4 +2,6 @@
angular.module('mean.system').controller('IndexController', ['$scope', 'Global', function ($scope, Global) {
$scope.global = Global;
+}]).controller('TestController', ['$scope', 'Global', function ($scope, Global) {
+ $scope.global = Global;
}]);
View
3  public/system/routes/system.js
@@ -11,6 +11,9 @@ angular.module('mean.system').config(['$stateProvider', '$urlRouterProvider',
.state('home', {
url: '/',
templateUrl: '/system/views/index.html'
+ }).state('test', {
+ url: '/test',
+ templateUrl: '/system/views/test.html'
})
.state('auth', {
templateUrl: '/auth/views/index.html'
View
60 public/system/views/header.html
@@ -1,39 +1,39 @@
<div class="page-header" data-ng-controller="HeaderController">
<div class="logo pull-left">
- <ul class="navbar-nav nav" data-ng-hide="global.authenticated">
+ <ul class="navbar-nav nav">
<li><a class="navbar-brand" href="/" mean-token="'site-title'">Home</a></li>
<li class="divider-vertical"></li>
- <li><a class="ng-binding navbar-brand" ui-sref="all movies" href="#!/movies">Movies</a></li>
+ <li><a class="ng-binding navbar-brand" ui-sref="all movies" href="">Movies</a></li>
</ul>
</div>
- <div class="left pull-left">
- <ul class="navbar-nav nav">
- <li data-ng-repeat="item in menus.main" ui-route="/{{item.link}}" ng-class="{active: $uiRoute}">
- <a mean-token="item.link" ui-sref='{{item.link}}'>{{item.title}}</a>
- </li>
- </ul>
- </div>
-
-<!-- <div class="account">
- <div class="text-edit">
- <div class="pull-right" data-ng-show="global.authenticated" mean-token-editable></div>
- </div>
- <ul class="navbar-nav nav" data-ng-hide="global.authenticated">
- <li><a ui-sref='auth.register'>Register</a></li>
- <li class="divider-vertical"></li>
- <li><a ui-sref='auth.login'>Login</a></li>
- </ul>
- <ul class="navbar-nav nav" data-ng-show="global.authenticated">
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
- {{global.user.name}} <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- <li><a href="/logout">Signout</a>
- </li>
- </ul>
+ <!-- <div class="left pull-left">
+ <ul class="navbar-nav nav">
+ <li data-ng-repeat="item in menus.main" ui-route="/{{item.link}}" ng-class="{active: $uiRoute}">
+ <a mean-token="item.link" ui-sref='{{item.link}}'>{{item.title}}</a>
</li>
- </ul>
-</div>-->
+ </ul>
+ </div>
+
+ <div class="account">
+ <div class="text-edit">
+ <div class="pull-right" data-ng-show="global.authenticated" mean-token-editable></div>
+ </div>
+ <ul class="navbar-nav nav" data-ng-hide="global.authenticated">
+ <li><a ui-sref='auth.register'>Register</a></li>
+ <li class="divider-vertical"></li>
+ <li><a ui-sref='auth.login'>Login</a></li>
+ </ul>
+ <ul class="navbar-nav nav" data-ng-show="global.authenticated">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ {{global.user.name}} <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="/logout">Signout</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>-->
View
3  public/system/views/test.html
@@ -0,0 +1,3 @@
+<section data-ng-controller="TestController">
+ <h1 mean-token="'movies-default'">This is the test view</h1>
+</section>
View
3  server/config/config.js
@@ -6,9 +6,10 @@ var _ = require('lodash'),
// Load configurations
// Set the node environment variable if not set before
+//process.env.NODE_ENV = 'development';
process.env.NODE_ENV = ~fs.readdirSync('./server/config/env').map(function(file) {
return file.slice(0, -3);
-}).indexOf(process.env.NODE_ENV) ? process.env.NODE_ENV : 'production';
+}).indexOf(process.env.NODE_ENV) ? process.env.NODE_ENV : 'development';
// Extend the base configuration in all.js with environment
// specific configuration
View
2  server/routes/index.js
@@ -1,4 +1,4 @@
-'use strict';
+ 'use strict';
module.exports = function(app) {
View
2  server/routes/movies.js
@@ -1,6 +1,6 @@
'use strict';
-// Movie routes use articles controller
+// Movie routes use movies controller
var movies = require('../controllers/movies');
module.exports = function(app) {

No commit comments for this range

Something went wrong with that request. Please try again.