Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.

When watching a video, pushing the back-button should close the modal #41

Closed
kennethlynne opened this issue Mar 4, 2014 · 4 comments
Closed

Comments

@kennethlynne
Copy link
Owner

No description provided.

@kennethlynne kennethlynne added this to the One week left! milestone Mar 4, 2014
@arealmaas arealmaas self-assigned this Mar 9, 2014
@arealmaas
Copy link
Collaborator

A thing like this would solve all of our problems: angular-ui/ui-router#562

Right now i think it's kind of messy that when you go back from the modal, the whole view and controller from the previous state will refresh.

Fixed the back-button issue with this line of code tho...

´$scope.$on('$stateChangeStart',
        function(event, toState, toParams, fromState, fromParams){
            //Will basically only emit in this route, but better be careful anyways
            $scope.$evalAsync(function () {
                if(fromState.name == 'videoDetails')
                    $modalInstance.dismiss(/*TODO: Store the progression of the video*/);
            });
        });´

And that produces a exception which angular are supposed to fix some time soon i hope. Atleast they have it on their backlog: angular/angular.js#5658

Discarded the work, fixing this some other time :D 👯

@kennethlynne
Copy link
Owner Author

Good find dear sir.

Also check out this and make a note of it for later http://jsbin.com/aFemAfe/22/edit

@arealmaas
Copy link
Collaborator

Yeah, saw that one. Real pinterest'ish and aweshome. 👶

@kennethlynne
Copy link
Owner Author

🌴

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants