Whenever I click on the submit button, I see this message in the console. Can someone please guide me on how to import Moment from node_modules into an Angular2 project?
This is my 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>
This is my app.module.ts:
export class AppModule {
addArticle(title: HTMLInputElement, link:HTMLInputElement): boolean{
console.log('title: ${title.value} and link: ${link.value}');
return false;
}
}