Passed
Push — master ( fa13eb...33d68f )
by Felipe Catão do
01:03
created

routes.teste   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
1
import EngineApp from '../../Framework/engine.js'
2
import homePage from "../pages/home.js"
3
import docs from '../pages/docs.js'
4
5
var isCreate=false
6
var eng=new EngineApp()
7
8
class routes{
9
    routesCreated(){
10
        
11
        //sistemas De rotas
12
        if(isCreate==false){
0 ignored issues
show
Best Practice introduced by
Comparing isCreate to false using the == operator is not safe. Consider using === instead.
Loading history...
13
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#pageInitial",this.teste)
14
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#docs",this.docc)   
15
        }
16
        isCreate=true
17
        eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/index.html","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial")
18
        eng.routesEngine.whenUpdate(eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/index.html","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial"))
19
    
20
    }
21
    teste(){
22
        eng.renderEngine.pageDynamic="dinamic-Article"
23
        eng.renderEngine.clearPage()
24
        homePage()
25
    }
26
    docc(){
27
    eng.renderEngine.pageDynamic="dinamic-Article"
28
    eng.renderEngine.clearPage()
29
    docs()
30
    }
31
    doc(){
32
        eng.routesEngine.goToLink("http://127.0.0.1:5500/LavineWiki/index.html#docs")
33
    }
34
}
35
36
37
export default routes
38