Skip to content

Afranioalves/route-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RouteJs

/*JavaScript*/

var app=new RouteJs(String, Object])

app.map(String, String || Promise || NodeList || Element || Node || app.useTemplate || app.usePromise)

app.mapAll(Object)

app.useTemplate(HTMLTemplateElement || Element)

app.usePromise(Promise, String || NodeList || Element || Node || app.useTemplate || app.usePromise)

app.createNodeList(String)
<!--HTML-->

<?A:B C?>

where A = Route name, B = Map name, C = placeholder (value to be displayed before B loads)

Examples

javascript

 var app =new RouteJs('app',{
     name:'Word'
 })
 console.log(app)

html

<!DOCTYPE html>
<html>
    <head>
        <script src="script.js"></script>
        <script>...</script>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="">
    </head>
    <body>
        Hello <?app:name?>
    </body>
</html>

preview

Hello Word

javascript

 app.map('name','App')

preview

Hello App

Examples

using template | list styling

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages