我需要添加
router= "/update/id" in my code, where "id" has to be rendered dynamically based on values by *ngFor directive. (i.e) {{obj.id}}.So that id gets rendered dynamically
Run Code Online (Sandbox Code Playgroud)
这该怎么做?
任何人都可以帮助我在 Visual Studio 代码中运行我从 Github 下载的代码
在我的索引文件中,我使用以下标记扩展布局:
extends layout
html
script(src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js')
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet',href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css')
script(src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js')
block content
h1= title
body
nav
.navbar.navbar-inverse
.container-fluid
.navbar-header
a
.navbar-brand(href='#') WebSiteName
ul.nav.navbar-nav
li.active
a(href='#') Home
li
a(href='#') Issues
li
a(href='#') Page 2
li
a(href='#') Page 3
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:只有命名块和混合可以出现在扩展模板的顶层。
谷歌搜索并尝试了一些没有帮助的基本修复
布局.pug:
doctype html
html
head
title= title
link(rel='stylesheet', href='stylesheets/style.css')
block content
body
nav
.navbar
.container-fluid
.navbar-header
a
.navbar-brand(href='#') WebSiteName
ul.nav.navbar-nav
li.active
a(href='#') Home
li
a(href='#') Page 1
li
a(href='#') Page 2
li
a(href='#') Page 3
Run Code Online (Sandbox Code Playgroud)