2017-03-27 55 views
0

我可能只是做了一些愚蠢的事情,但放縱我?Aurelia映射到剃刀視圖

說我有這個奧裏利亞視圖模型 -

import { useView } from "aurelia-framework"; 

@useView("/LandingPartials/Intro") 
export class Intro { 
} 

這MVC控制器的方法

public ActionResult Intro() 
{ 
    return View("IntroPartial"); 
} 

這Razor視圖(目前沒有任何動態,只是爲了測試)

<template> 
    <section id="intro" class="intro"> 
     <div class="slogan"> 
      <h2> 
       <span class="text_color">Something Something</span> 
      </h2> 
      <h4>Something something something profit?</h4> 
     </div> 
     <div class="page-scroll"> 
      <a href="#services" class="btn btn-circle"> 
       <i class="fa fa-angle-double-down animated"></i> 
      </a> 
     </div> 
    </section> 
</template> 

一切都被正確調用,似乎沒問題,爲什麼我會收到以下錯誤信息?

Template markup must be wrapped in a <template> element 

這讓我很生氣(並且破壞了我的球場,讓我的公司通過React去Aurelia)。

回答

0

好的,沒關係,找到它了。問題是_ViewStart.cshtml部分。

我刪除了它的內容 - 因爲我使用自定義佈局 - 突然,一切都很好。

正如我所說的,一些愚蠢的東西。不過,我會在這裏留下這個問題。如果其他人有一個時刻,並做同樣的愚蠢的事情。