I'm a beginner in Angularjs and ng-bootstrap
. I've created a sample Web site and added navigation for my site. It's working good, but I have some issue, I'm trying to display current date as 2017-12-18
this one is not displayed, I want to know how to added correctly to my site
I'm following this Angularjs - display current date
app-navbar.component.html
<div ng-app ng-controller="Ctrl">
{{date | date:'yyyy-MM-dd'}}<br/>
</div>
<script>
function Ctrl($scope)
{
$scope.date = new Date();
}
</script>
app-navbar.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-navbar',
templateUrl: './app-navbar.component.html',
styleUrls: ['./app-navbar.component.css']
})
export class AppNavbarComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}