show-express
v0.1.1
Published
Depending on the browser to return to a different view.
Downloads
5
Readme
show-express
Depending on the browser to return to a different view.
example:
var express = require('express')
require('show-express')
var app = express.createServer(
......
// show-express need browserType middleware
// npm install browserType
require('browserType')()
)
app.get('/',function(req,res){
//res.show usage == res.render
res.show('index')
})
if have views/chrome/index.ejs and chrome browser request , then index page is chrome/index.ejs , and layout page is views/layout.ejs.
if have views/chrome/layout.ejs , then layout page is /views/chrome/layout.ejs.
support browser
ie6
ie7
ie8
ie9
ie10
firefox
chrome
opera
safari
views dir
views/chrome
views/ie9
views/opera