I\'m confused a little.
See this simple directive:
@Directive({
selector: \'[myDirective]\'
})
export class MyDirective {
priva
binding [] is for objects, without it the value is string. Be careful about types.
In the code
you have tried to bind the object, but the object is not available, thus it's value is undefined. On the other hand if you remove binding then the object is gone, you have only a string value assigned to the property.