单击提交按钮时,我在控制台中遇到此消息,如果有人可以帮助我如何将时刻从 node_modules 导入到 angula2 项目!
我的 app.component.html
<form class="ui large form segment">
<h3 class="ui header">Add a Link</h3>
<div class="field">
<label for="title">Title:</label>
<input name="title" #newtitle>
</div>
<div class="field">
<label for="link">Link:</label>
<input name="link" #newlink>
</div>
<div>
<button (click) ="addArticle(newtitle, newlink)" class="ui positive button">Submit link</button>
</div>
</form>
我的 app.module.ts
export class AppModule {
addArticle(title: HTMLInputElement, link:HTMLInputElement): boolean{
console.log('title: ${title.value} and link: ${link.value}');
return false;
}
}