Browse Source

change - to consider all Views on first render

master
Marek Piasecki 2 years ago
parent
commit
92b0676511
  1. 2
      bin/pro-router.imba
  2. 5
      src/index.js

2
bin/pro-router.imba

@ -60,7 +60,7 @@ def importRouter
return status: true, message: "import definition already there"
else
try
nfs.writeFileSync indexFile, "import './router.imba'\n" + indexContent
nfs.writeFileSync indexFile, "import './router.imba'\n" + indexContent + "\nR.url_changed() // the best if you move it right before imba.mount"
return status: true, message: "definition added successfuly"
catch
return status: false, message: "failed during writing to file"

5
src/index.js

@ -1,4 +1,3 @@
import './router.imba'
if(import.meta.env.MODE == 'development'){
import("./main.imba")
}
import './main.imba'
R.url_changed() // the best if you move it right before imba.mount
Loading…
Cancel
Save