Angular 1.5 Nested Component Bind parent Value

Viewed 19304

I am new to angularjs. I am trying angular 1.5 nested component. Can I bind parent component property in child component.

Ex:

<div ng-app='cbsApp' ng-controller='cbsCnt as ct'>
    <cbs-cus-comp com-bind='ct.name'>
        <child child-com-bind='cbsCusCompCntAs.name'></child>
    </cbs-cus-comp>
</div>

I can get ct.name value in com-bind. But can't get cbsCusCompCntAs.name in child-com-bind. (cbsCusCompCntAs is cbs-cus-comp controller)

Working Plunker : https://plnkr.co/edit/axQwTn?p=preview

Thanks in advance.

3 Answers
Related