Famous / famous-angular

Bring structure to your Famo.us apps with the power of AngularJS. Famo.us/Angular integrates seamlessly with existing Angular and Famo.us apps.
https://famo.us/angular
Mozilla Public License 2.0
1.92k stars 275 forks source link

unimplemented: fa-header-footer-layout does not support removing children #179

Closed animepauly closed 10 years ago

animepauly commented 10 years ago

I am making an app using the header footer layout. Inside the content modifier I have an ng-repeat where I am building out a list of answer choices for a question. I am seeing that it's updating the children but it's throwing this error "unimplemented: fa-header-footer-layout does not support removing children". So it seems to be working but still throwing this error. Also I am uncertain if I am even setting this up properly, check the markup below:

<fa-modifier id="content" fa-size="[undefined, undefined]">
...
<fa-modifier ng-repeat="choice in choices" fa-translate="[0, -55 + ((55+choicePaddingInt)*$index), 1]">
    <fa-modifier id="{{'choice-' + $index}}">
        <fa-view id="ChoiceView">
            <!-- PB: I need to play around with the positioning of this some more later -->
            <fa-modifier fa-size="[300, 55]" fa-origin="[0.5, 0.5]" fa-align="[0.5, 0.5]">
                <fa-surface class="choice-item" fa-click="myClickHandler($event, $index)" >
                                </fa-surface>
            </fa-modifier>
            <fa-modifier fa-size="[300, 55]" fa-origin="[0.5, 0.25]" fa-align="[0.5, 0.5]">
                   <fa-surface ng-class="getCorrectClass(choice)" class="choice-text">{{choice.text}}</fa-surface>
            </fa-modifier>
        </fa-view>
    </fa-modifier>
    </fa-modifier>
</fa-modifier>
animepauly commented 10 years ago

just posting the error

unimplemented: fa-header-footer-layout does not support removing children angular.js:10023 (anonymous function) angular.js:10023 (anonymous function) angular.js:7327 Scope.$emit angular.js:12848 (anonymous function) famous-angular.js:3543 Scope.$broadcast angular.js:12911 Scope.$destroy angular.js:12569 ngRepeatAction angular.js:20460 $watchCollectionAction angular.js:12344 Scope.$digest angular.js:12471 Scope.$apply angular.js:12736 (anonymous function) famous-angular.js:1178 emit EventEmitter.js:36 emit EventHandler.js:79 emit Surface.js:107 eventForwarder

zackbrown commented 10 years ago

Hey @animepauly, @rajatkhanna82 is taking this on and should have this feature implemented soon. If it does seem to be working correctly for you aside from the exception, as a temp fix in the meantime you can try just commenting out that exception-throwing line from faHeaderFooterLayout in famous-angular.js.

animepauly commented 10 years ago

Thanks for the tip!

bguiz commented 10 years ago

+1

bguiz commented 10 years ago

OK in a different use case, this error bites me a little harder. When I am on a route that does not use fa-header-footer-layout and change routes to one that does use one, all is well. However, when I am on a route that uses fa-header-footer-layout and transition to any other route, I get this error, and it prevents the route transition from completing, and any subsequent route actions from happening.

zackbrown commented 10 years ago

182 should fix this — I just need to test it out and then merge it in. You can try patching it in in the meantime if you'd like :)

bguiz commented 10 years ago

@zackbrown thanks for the heads up!

zackbrown commented 10 years ago

fixed by #203