I am trying to use a function in a playback preview template
@active(path: String):String = @{ var active:String = "" if (request.path.startsWith(path)) { active = "class=\"active\"" } return active } <div class="container-fluid"> .... <li @active("/page") ...>
The playback compiler says that it cannot find the value active. What is wrong here?
myborobudur
source share