简体   繁体   中英

NHAML Directives

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

if you mean adding references and importing namespaces you do it in the app.config or 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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM