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

Datetime:2016-08-23 02:35:31         Topic: AngularJS          Share        Original >>
Here to See The Original Article!!!

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?


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.


Put your ads here, just $200 per month.