I have a modal in the visualforce page that i want to move to its own component, for the most part its just displaying information. The data passed to the conponent controller constructor doesn't seem to be available. Here is a sample of how the code is setup.
main.page
<apex:page controller="mainCtrl">
<div class="modal fade" id="myModal" tabindex="-1" role="dialog">
<customCmp value="{!value}" >
</div>
</apex:page>
customCmp.component
<apex:component controller="compCtrl">
<apex:attribute type="String" name="value" assignTo="{!value}" description=""/>
</apex:component>
compCtrl.cls
class compCtrl {
public String value {get; set;}
compCtrl (){
System.debug(value);
}
}