Skip to content

Loss of inner scope #5

@jdhiro

Description

@jdhiro

Using the angular-pull-to-refresh directive appears to eat the scope of child elements.

For example, given:

<div class="fragment" scroll-to="{{scrollInFeed}}" on-scroll-bottom="loadMorePosts" offset="25">
    <div pull-to-refresh="loadNewPosts()">

    <!-- SECTION: New post / sign in -->
    <form class="feed-form-new" name="postForm" ng-submit="newPost()" ng-class="{expanded: inputExpand}">
        <div ng-hide="sessionState.authenticated">
            <a href="#/login" class="feed-unauth-button button">Sign in to post</a>
        </div>
        <textarea on-focus="inputExpand=true" ng-show="sessionState.authenticated" required
                  ng-model="postForm.content" class="expandable-form-textarea"
                  ng-class="{expanded: inputExpand}" placeholder="Post something"></textarea>
        <input class="expandable-form-button cancel" ng-show="inputExpand" type="button" value="Cancel" ng-click="postClear(postForm)"/>
        <input class="expandable-form-button" ng-show="inputExpand" type="submit" value="Post" />
    </form>
</div>

We are no longer able to access $scope.postForm or $scope.postForm content, they are undefined.

I don't what was a resolution for this is, but I see what looks like it might be a related discussion on $scope with ng-transclude here: https://groups.google.com/forum/#!msg/angular/az8_uNV7KyE/9YYEP8aLnnoJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions