Skip to content

Commit

Permalink
Tue, Nov 15, 2016 7:04:42 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
Manish Jain committed Nov 15, 2016
1 parent 7bb1a19 commit e7e6415
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions angular-javascript-practice-target/app/providers/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ angular.module('Portal')
controllerAs : 'defaultScopeDirectiveCtrl'*/
});
$stateProvider.state('modules.isolatedScopeDirective',{
url : '/inheritScopeDirective',
url : '/isolatedScopeDirective',
templateUrl : function($stateParams){
return '/view/content/partial/isolatedScopeDirective.html'
},
Expand All @@ -94,9 +94,9 @@ angular.module('Portal')
controllerAs : 'sceServiceCtrl'
});
$stateProvider.state('modules.portalHttpInterceptor',{
url : '/inheritScopeDirective',
url : '/portalHttpInterceptor',
templateUrl : function($stateParams){
return '/view/content/partial/portalHttpInterceptor.html?portalHttpInterceptor=portalHttpInterceptor'
return '/view/content/partial/portalHttpInterceptor.html'
},
controller : 'portalHttpInterceptorController'/*,
controllerAs : 'defaultScopeDirectiveCtrl'*/
Expand Down
3 changes: 3 additions & 0 deletions angular-javascript-practice-target/server/routes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports.index = function(req, res){
res.render('index');
};
18 changes: 9 additions & 9 deletions angular-javascript-practice-target/server/server.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
var express = require('express'),
var express = require('../../node_modules/express'),
cookieParser = require('cookie-parser'),
bodyParser = require('body-parser'),
session = require('express-session'),
errorhandler = require('errorhandler'),
csrf = require('csurf'),
//routes = require('./routes'),
routes = require('./routes'),
//services = require('./routes/routes'),
app = express();

app.set('views', __dirname + '/views');
app.set('view engine', 'jade');

app.use(session({
secret: 'angular-javascript',
secret: 'angular-javascript-practice-target',
saveUninitialized: true,
resave: true }));
app.use(cookieParser());
Expand All @@ -35,15 +34,16 @@ app.use(function (req, res, next) {
var csrf = req.csrfToken();
res.cookie('XSRF-TOKEN', csrf);
res.locals._csrf = csrf;
console.log(1)
next();
});

/*app.get('/', routes.index);
var csrfProtection = csrf({ cookie: true })
/*app.get('/',csrfProtection, routes.index);
var baseUrl = '/api/services';
app.use(baseUrl , services);*/
app.get('*', routes.index);
app.use(baseUrl , services);
app.get('*',csrfProtection, routes.index);*/


app.listen(8085, function () {
console.log("Angular Express server listening on port %d in %s mode", this.address().port, app.settings.env);
console.log("'Angular JS Practice Target' Express server listening on port %d in %s mode", this.address().port, app.settings.env);
});
1 change: 1 addition & 0 deletions angular-javascript-practice-target/server/views/index.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../index.html
3 changes: 1 addition & 2 deletions javscript-application/web-app/package.json → package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"load-grunt-tasks": "^0.4.0",
"time-grunt": "^0.3.1",
"grunt-cli": "0.1.13",
"body-parser": "1.13.3",
"body-parser": "1.13.3",
"cookie-parser": "1.3.5",
"csurf" : "1.8.3",
"errorhandler" : "1.4.2",
Expand All @@ -57,7 +57,6 @@
"multiparty" : "4.1.2",
"multer" : "1.1.0",
"grunt-include-source" : "1.0.0"

},
"engines": {
"node": ">=0.10.0"
Expand Down

0 comments on commit e7e6415

Please sign in to comment.