Skip to content

Instantly share code, notes, and snippets.

@byrichardpowell
Created November 28, 2012 18:12
Show Gist options
  • Save byrichardpowell/4162981 to your computer and use it in GitHub Desktop.
Save byrichardpowell/4162981 to your computer and use it in GitHub Desktop.
<script type="text/view>
<% if ( SystemOwners !== undefined && SystemOwners.Name ) { %>
<p>System owners is <%= SystemOwners.Name %></p>
<!-- Even when _embedded.SystemOwners[0].Name is a string this html will never be outputted -->
<% } else { %>
<p>No one owns this system</p>
<% } %>
</script>
@jdalton
Copy link

jdalton commented Nov 28, 2012

If SystemOwners is an array then SystemOwners.Name should be SystemOwners[0].Name am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment