我正在用Orchard创建一个网站。使用AngularJS我正在从ASP.NET web API项目读取数据,并在我的网站上显示数据。我想要做的是显示页面的标题和元数据。在Orchard CMS动态地添加标题
我曾尝试本作的标题,但我得到了以下错误:
<div ng-controller="bookDetailController" data-ng-init="AddReaded()" ng-cloak>
@{
Layout.Title = {{book.Title}};
}
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0820: Cannot initialize an implicitly-typed local variable with an array initializer
剃刀被编译在服务器端,所以它永远不会知道的变化在前端。 – devqon