Update With Angular
This commit is contained in:
parent
4942b9758a
commit
1c6b19178e
|
@ -0,0 +1,3 @@
|
|||
app.controller('main_controller', ['$scope','brandInfo','brandData','itemData','sizeData','$route','$window', 'title',
|
||||
function($scope){}
|
||||
]);
|
|
@ -0,0 +1 @@
|
|||
var app = angular.module('diapers_app',[]);
|
|
@ -1,5 +1,10 @@
|
|||
<html>
|
||||
<html ng-app="diapers_app">
|
||||
<head>
|
||||
<!-- Angular Scripts -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
|
||||
<script src="/public/scripts/module.js"></script>
|
||||
<script src="/public/scripts/main_controller.js"></script>
|
||||
<!-- End Angular Scripts -->
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -12,14 +12,14 @@ var port = process.env.PORT || process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
|||
//app.use(morgan('combined'));
|
||||
|
||||
//External Routing
|
||||
app.get('/', function (req, res) {
|
||||
app.use('/public', express.static(__dirname + '/public'));
|
||||
|
||||
app.get('*', function (req, res) {
|
||||
console.log('works as expected');
|
||||
res.sendFile(__dirname + '/public/views/pages/index.html');
|
||||
//res.send('Hello World Again!');
|
||||
});
|
||||
|
||||
app.use('/public', express.static(__dirname + '/public'));
|
||||
|
||||
//app Initialize
|
||||
app.listen(port, ip);
|
||||
//console.log('live on ip: ' + ip + ':' + port);
|
||||
|
|
Loading…
Reference in New Issue