angularjsJS one way binding component trigger 'Invalid controller bindings definition for d...

Datetime:2016-08-23 02:35:31          Topic: AngularJS           Share

when getting this weird error when applying binding in an angularjs component:

Error: [$compile:iscp] Invalid controller bindings definition for directive 'workTimekeepingsDay'. Definition: {… timekeepings: '<' …}

Here is the code:

<work-timekeepings-day timekeepings="dailyTimekeepingCtrl.timekeepingList | timekeepingDay : dailyTimekeepingCtrl.selectedDay" day="dailyTimekeepingCtrl.selectedDay"></work-timekeepings-day>

var workTimekeepingsDay = TimekeepingsApp.component('workTimekeepingsDay', {

templateUrl : 'angular/components/work-timekeepings-day.html',

controllerAs: '$workTkDayCtrl',

bindings : {

timekeepings : '<',

day: '='

}

});

HTML template:

<div class="row lightgreen-row padding-5 border-rounded" ng-repeat-start="workTk in $workTkDayCtrl.timekeepings | timekeepingDay : day">

<div class="col-md-4"> <b> {{ workTk.user.firstName + ' ' + workTk.user.lastName }} </b> </div>

What is wrong with 'timekeepings' binding?

Thanks.

Solution :

I also go this error, but it was due to using a 1.5.0 RC version of angular. Updating to the latest version of angularjs fixed the issue for me.





About List