【发布时间】:2009-04-28 16:35:47
【问题描述】:
有谁知道如何在 NHAML 中使用指令(例如 @Import)?
【问题讨论】:
标签: nhaml
有谁知道如何在 NHAML 中使用指令(例如 @Import)?
【问题讨论】:
标签: nhaml
如果你的意思是添加引用和导入命名空间,你可以在 app.config 或 web.config 中进行
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="nhaml" type="NHaml.Configuration.NHamlConfigurationSection, NHaml"/>
</configSections>
<nhaml autoRecompile="true">
<assemblies>
<add assembly="NHaml.Samples.Mvc"/>
</assemblies>
<namespaces>
<add namespace="NHaml.Web.Mvc"/>
<add namespace="NHaml.Samples.Mvc.Controllers"/>
</namespaces>
</nhaml>
...
</configuration>
【讨论】: