Added abp-if tag helper

pull/301/head
Halil İbrahim Kalkan 7 years ago
parent 94bc24f72f
commit 695cf313c8

@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.If
{
[HtmlTargetElement(Attributes = "abp-if")]
public class AbpIfTagHelper : AbpTagHelper
{
[HtmlAttributeName("abp-if")]
public bool Condition { get; set; }
public override void Process(TagHelperContext context, TagHelperOutput output)
{
if (!Condition)
{
output.SuppressOutput();
}
}
}
}
Loading…
Cancel
Save