ADF and Angular Material 2

cancel
Showing results for 
Search instead for 
Did you mean: 
nickchase
Member II

ADF and Angular Material 2

This is the background.....I am building an application using ADF and have update to Angular 2.0.0 beta 11.  I have upgraded to this version because there are a number of UI components which I want to use in workflow forms.  I have just run 'npm start' and when it loads into the browser I get the following error -

Can't bind to 'mdDatepickerToggle' since it isn't a known property of 'button'. ("     <button
            [attr.data-automation-id]="'datepickertoggle-' + property.key"
            [ERROR ->][mdDatepickerToggle]="picker">
        </button>
        <md-datepicker #picker
"): ng:///CardViewModule/CardViewDateItemComponent.html@14:12

Have done some research and this error is because [mdDatepickerToggle] has now been changed by the Material team to <md-datepicker-toggle> element.  Sadly I cant regress to a previous version of Material 2 because of the new UI components.

So, here is my real question.....what should I do about this?

I have pulled a subversion from the ADF repository and was thinking of editing the code to work with the new version of Material 2 but once I have updated the code I am not sure how to use it locally or even if anyone would want me to resubmit to the main ADF branch for inculsion if appropriate.

I have read the ADF docs and am not sure which version of Material 2 they are built against?

Some guidance on best way forward would be appreciated.

Many thanks

1 Reply
dvuika
Alfresco Employee

Re: ADF and Angular Material 2

Are you sure your Angular version is 2 beta 11? It's an extremely old version and not supported anywhere for like a year.

The Material2 library has its own life cycle and the latest version depends on "Angular 4.4.3 or greater": Releases · angular/material2 · GitHub 

The latest ADF (1.9.0-beta6) depends on Material 2 (beta 10) though. The minimal version of the Angular to build ADF from sources is: 4.3.6. You can see all releases here: angular/CHANGELOG.md at master · angular/angular · GitHub