Here is the Angular controller setup:
app.controller("timelineCtrl", function ($scope) {
$scope.user="john";
.
.
.
}
This directive is also in place:
app.directive('helloWorld', function() {
return {
restrict: 'AE',
replace: true,
template: '<div> Hello World {{user}} </div>'
};
});
The corresponding view looks like this:
<div class="row" ng-controller="timelineCtrl">
<hello-world></hello-world>
</div>
However, when checking the result HTML, we see:
Hello World {{user}}
We are left wondering why {{user}}
is not being interpreted as the value of $scope.user
.