The data
variable refers to the observable which is passed to the template (a data item in the data source, in your example). Kendo UI uses a with block for templates; this means that the observable is added to the scope chain the template variables are evaluated in; so you could also use this instead:
<script id="hierarchicalMobileListViewTemplate" type="text/x-kendo-template">
# if (HasEmployees) { #
<h1> #: FullName # </h1>
# } else { #
<h2> #: data.FullName # </h2>
# } #
</script>
You might also want to read this answer.