I can't figure out why if you have a hyperlink to a remote view as a drawer item, it will correctly render the remote view within the Index.html page and have all the copied elements from the layout...i.e. the header and script references, etc.
See link in drawer item below: "views/business.html?businessId=3".
But, if I put his same hyperlink in another view, it will navigate to that view, but it will NOT copy all the layout elements like the head section with the script references. I just get the html elements of the remote view....
See link in drawer item below: "views/business.html?businessId=3".
<!DOCTYPE html>
<
html
>
<
head
>
<
title
></
title
>
<
meta
charset
=
"utf-8"
/>
<
link
href
=
"kendo/styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/main.css"
rel
=
"stylesheet"
/>
<
script
src
=
"cordova.js"
></
script
>
<
script
src
=
"kendo/js/jquery.min.js"
></
script
>
<
script
src
=
"kendo/js/kendo.mobile.min.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"https://maps.googleapis.com/maps/api/js?key=AIzaSyBu29iUhQeU6HuCPhv4cehlkdWaEn0H-5E&sensor=true"
></
script
>
<
script
src
=
"scripts/app.js"
></
script
>
</
head
>
<
body
id
=
"body"
>
<
div
data-role
=
"layout"
data-id
=
"main"
>
<
div
data-role
=
"header"
>
<
div
data-role
=
"navbar"
>
<
span
data-role
=
"view-title"
></
span
>
<
a
data-role
=
"button"
href
=
"#appDrawer"
data-rel
=
"drawer"
data-align
=
"left"
data-icon
=
"drawer-button"
></
a
>
</
div
>
</
div
>
<!-- application views will be rendered here -->
</
div
>
<!-- application drawer and contents -->
<
div
data-role
=
"drawer"
id
=
"appDrawer"
style
=
"width: 200px"
data-title
=
"Navigation"
data-position
=
"left"
data-swipe-to-open
=
"false"
>
<
div
data-role
=
"header"
>
<
div
data-role
=
"navbar"
>
<
span
data-role
=
"view-title"
></
span
>
</
div
>
</
div
>
<
ul
data-role
=
"listview"
>
<
li
>
<
a
href
=
"views/home.html"
data-icon
=
"home"
>Home</
a
>
</
li
>
<
li
>
<
a
href
=
"views/map.html"
>Map</
a
>
</
li
>
<
li
>
<
a
href
=
"views/settings.html"
data-icon
=
"settings"
>Settings</
a
>
</
li
>
<
li
>
<
a
href
=
"views/contacts.html"
data-icon
=
"contacts"
>Contacts</
a
>
</
li
>
<
li
>
<
a
href
=
"views/business.html?businessId=3"
data-icon
=
"contacts"
>Business Test</
a
>
</
li
>
</
ul
>
</
div
>
</
body
>
</
html
>
But, if I put his same hyperlink in another view, it will navigate to that view, but it will NOT copy all the layout elements like the head section with the script references. I just get the html elements of the remote view....
<
html
><
head
></
head
><
body
><
div
id
=
"businessDetail"
data-role
=
"view"
data-title
=
"Business Details"
data-layout
=
"main"
data-model
=
"APP.models.business"
data-init
=
"initBusinessDetails"
>
<!--<label for="Name">Name:</label><input id="name" data-bind="value: data.name" />-->
<
img
style
=
"float:left;width:50px;margin-right:5px;"
data-bind
=
"attr: { src: data.image_url }"
>
<
div
style
=
"float:left;display:inline-block;"
>
<
span
data-bind
=
"text: data.name"
></
span
><
br
>
<
span
data-bind
=
"text: data.address1"
></
span
><
br
>
<
span
data-bind
=
"text: data.city"
></
span
>, <
span
data-bind
=
"text: data.postal_code"
></
span
>
</
div
>
</
div
>
</
body
></
html
>