1
我需要更改Razor視圖內某些靜態JSON數據的輸出。我想要做的是沿線Razor if語句與JSON
, actions: { // <- this is JSON curly bracker
listAction: '/Operations/Get'
@if(ViewBag.AllowInput)
{ // <- this is Razor curly bracker
, createAction: '/Operations/Create'
, deleteAction: '/Operations/Delete'
} // <- this is Razor curly bracket
} // <- this is JSON curly bracker
但是,JSON標記會與剃刀大括號混爲一談。有沒有其他的語法,或者,我可能做一些真正愚蠢的錯誤?
' '。 –
CodeCaster