-
-
Save kedrovski/dfa56e68c9f8e8177a3f9c047b95d6a7 to your computer and use it in GitHub Desktop.
Revisions
-
jrmoran revised this gist
Dec 13, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,8 @@ app.config(function($locationProvider, $routeProvider) { // $locationProvider.html5Mode(true); $routeProvider .when('/', { templateUrl: 'partials/index', controller: 'ctrl' }) .when('/about', { templateUrl: 'partials/about', controller: 'ctrl' }) .otherwise({redirectTo:'/'}); }); app.controller('ctrl', function($scope){}); -
jrmoran revised this gist
Dec 13, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,6 @@ app.set('views', __dirname + '/views') app.use(express.static __dirname + '/public') app.get('/partials/:filename', routes.partials) app.use(routes.index) # everything else app.listen 3000 -
jrmoran revised this gist
Dec 13, 2012 . 3 changed files with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ var app = angular.module('app', ['ngResource']); app.config(function($locationProvider, $routeProvider) { // $locationProvider.html5Mode(true); $routeProvider .when('/', { templateUrl: 'partials/index', controller: 'ctrl' }) .when('/about', { templateUrl: 'partials/about', controller: 'ctrl' }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,7 @@ app.set('view engine', 'ejs') app.set('views', __dirname + '/views') app.use(express.static __dirname + '/public') app.get('/partials/:filename', routes.partials) app.use(routes.index) app.listen 3000 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,9 @@ <%- message %> <a href="#/about"> /about</a> | <a href="#/"> home</a> <!-- uncomment if HTML5Mode on --> <!-- <a href="/about"> /about</a> | --> <!-- <a href="/"> home</a> --> <hr /> <div ng-view></div> </body> -
jrmoran revised this gist
Dec 13, 2012 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,18 +3,18 @@ <head> <meta charset="UTF-8" /> <title>Test</title> <script src="components/angular-complete/angular.js" type="text/javascript"></script> <script src="components/angular-complete/angular-resource.js" type="text/javascript"></script> <script src="app.js" type="text/javascript"></script> </head> <body ng-app='app'> <%- message %> <a href="#/about"> /about</a> | <a href="#/"> home</a> <hr /> <div ng-view></div> </body> </html> -
jrmoran created this gist
Dec 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ var app = angular.module('app', ['ngResource']); app.config(function($routeProvider){ console.log('hi'); $routeProvider .when('/', { templateUrl: 'partials/index', controller: 'ctrl' }) .when('/about', { templateUrl: 'partials/about', controller: 'ctrl' }); }); app.controller('ctrl', function($scope){}); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ exports.index = (req, res)-> res.render 'index', message:"Hello!!!" exports.partials = (req, res)-> filename = req.params.filename return unless filename # might want to change this res.render "partials/#{filename}" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ express = require 'express' routes = require './routes' engine = require 'ejs-locals' app = express() app.engine('ejs', engine) app.set('view engine', 'ejs') app.set('views', __dirname + '/views') app.use(express.static __dirname + '/public') app.get('/', routes.index) app.get('/partials/:filename', routes.partials) app.listen 3000 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Test</title> <script src="components/angular-complete/angular.js" type="text/javascript"></script> <script src="components/angular-complete/angular-resource.js" type="text/javascript"></script> <script src="app.js" type="text/javascript"></script> </head> <body ng-app='app'> <%- message %> <a href="#/about"> /about</a> | <a href="#/"> home</a> <hr /> <div ng-view></div> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <h1>About</h1> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <h1>Index</h1>