Skip to content

Commit

Permalink
Changed views.json to use viewFile attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
razaibi authored Sep 8, 2024
1 parent 0471e90 commit fe6ec91
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Once you have created the textfile for your view (in the **views** folder), upda
{
"viewName": "listView",
"url": "/",
"HTML": "listView.txt"
"viewFile": "listView.html"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion Wirup.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ wirup.prototype = (function () {
_fillView = (index, target) => {
return _wijax(
"GET",
"views/" + _views[index]["HTML"],
"views/" + _views[index]["viewFile"],
"text/plain; charset=UTF-8",
(data) => {
_getElement(target).innerHTML = data;
Expand Down
2 changes: 1 addition & 1 deletion Wirup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/js/Wirup.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ wirup.prototype = (function () {
_fillView = (index, target) => {
return _wijax(
"GET",
"views/" + _views[index]["HTML"],
"views/" + _views[index]["viewFile"],
"text/plain; charset=UTF-8",
(data) => {
_getElement(target).innerHTML = data;
Expand Down
2 changes: 1 addition & 1 deletion example/js/Wirup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions example/views/views.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
{
"viewName": "listView",
"url": "/",
"HTML": "listView.html"
"viewFile": "listView.html"
},
{
"viewName": "rocketsView",
"url": "/rockets",
"HTML": "rocketsView.html"
"viewFile": "rocketsView.html"
},
{
"viewName": "priceView",
"url": "/prices",
"HTML": "priceView.html"
"viewFile": "priceView.html"
}
]
}

0 comments on commit fe6ec91

Please sign in to comment.