I have the following component:
angular.module('foo')
.component('searchInput', {
bindings: {
text: "<query"
},
templateUrl: 'components/searchInput/searchInput.html',
controller: 'SearchInputCtrl'
});
To transmit the following:
expect(component.text).toBe('bar');
I need to use the following code:
var component = $componentController('searchInput',
{$scope: {}},
{
text: 'bar'
}
);
However, I want to verify that the value bound to "text" is derived from the "query". This one does not work :
var component = $componentController('searchInput',
{$scope: {}},
{
query: 'bar'
}
);
source
share