In this scenario, my component object is structured as follows:
var options = {
bindings: {
title: '<',
rows: '<'
},
controller: registers,
templateUrl: function ($element, $attrs) {
return '/app/dashboard/registers/register.html';
}
};
The challenge I'm facing is accessing the bindings title
and rows
within my register.html
template. While I grasp the concept of using $element
and $attrs
, injecting these into a templateUrl which needs to reference an HTML file appears tricky.
My ultimate goal is to utilize these values within the template in the following manner:
<p>Title: {{vm.title}}</p>
<p>Rows: {{vm.rows}}</p>
If anyone could guide me on how to set up the templateUrl so it can interpolate the binding values directly into the markup, that would be greatly appreciated.