【问题标题】:NHAML DirectivesNHAML 指令
【发布时间】:2009-04-28 16:35:47
【问题描述】:

有谁知道如何在 NHAML 中使用指令(例如 @Import)?

【问题讨论】:

    标签: nhaml


    【解决方案1】:

    如果你的意思是添加引用和导入命名空间,你可以在 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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多