Skip to content

Commit

Permalink
Corrected the header display logic for some browsers.
Browse files Browse the repository at this point in the history
Some browsers like Chrome do not support String.endsWith(). Hence,
indexOf is used instead.
  • Loading branch information
VineetReynolds committed Sep 27, 2013
1 parent 21a1c47 commit 69621f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/scaffold/views/detail.html.ftl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#assign formName = "${entityName}Form"
model = "${entityName?uncap_first}">
<header ng-switch on="$location.path().endsWith('/${entityName}s/new')">
<header ng-switch on="$location.path().indexOf('/${entityName}s/new') > -1">
<h3 ng-switch-when="true">Create ${entityName}</h3>
<h3 ng-switch-when="false">View or edit ${entityName}</h3>
</header>
Expand Down

0 comments on commit 69621f4

Please sign in to comment.