簡體   English   中英

NHAML指令

[英]NHAML Directives

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

如果您要添加引用並導入名稱空間,則可以在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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM