Hello,
I am using syncfusion angular grid with some template binding you can make your self more clear by refer below code snippet.
This code in javascript:
$scope.columns = [
{ field: "name", headerText: resource.templateName, template: "true", templateID: "#nameUrlTemplate", width: 300 },
{ field: "description", headerText: resource.description, template: "true", templateID: "#descriptionUrlTemplate", width: 400 }
];
This code in CSHTML:
<script type="text/x-jsrender" id="nameUrlTemplate">
{{if name != ""}}
<a rel='nofollow' href="@Url.Action("Edit", "Home")?agenttypeid={{:agentTypeId}}&templateversion={{:templateVersion}}&dataSourceType={{:dataSourceType}}">{{:name}}</a>
{{/if}}
</script>
<script type="text/x-jsrender" id="descriptionUrlTemplate">
{{if description != ""}}
<a rel='nofollow' href="@Url.Action("Edit", "Home")?agenttypeid={{:agentTypeId}}&templateversion={{:templateVersion}}&dataSourceType={{:dataSourceType}}">{{:description}}</a>
{{/if}}
</script>
this code is working very fine but i placed it in cshtml file. so problem is i have to follow some coding standard and because of that i have to put this code code in separate javascript file as per codding standard.
so is there any way to put this code in separate javascript.
aspect quick reply.
Many thanks,
Rakesh.