Skip to content

View directive refactor for angular 1.2 #553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

View directive refactor for angular 1.2 #553

wants to merge 1 commit into from

Conversation

dlukez
Copy link
Contributor

@dlukez dlukez commented Nov 3, 2013

Had a play around with an alternative refactor for angular 1.2 as a result of the issue brought up by @arush in issue #320.

May have been overkill considering there was probably one or two lines that were causing said issue but this is where I ended up. The code closely mimics that of ui-router/master and ngView and uses transclusion.

It passes the recently updated tests and an extra one added from the master branch, tweaked for this branch. It's working in two projects I'm using at home. Also updated the test libs with 1.2.0-rc.3 and the karma file since 'grunt karma' was telling me off.

I also added animation events that fire when a view animation starts/ends since in a project I'm working on I wanted to prevent certain actions from being run while the state was changing or the animation was running. In hindsight, I could have solved this problem by checking for animation classes on the view element to determine if an animation is running, but this was simpler. There are no animation events used elsewhere in Angular, so I'm not opposed to removing it.

@nateabele
Copy link
Contributor

I don't think we really want to duplicate the 600+ files in the Angular repo here. Also, please follow the dev guidelines and squash your commits.

@dlukez
Copy link
Contributor Author

dlukez commented Nov 4, 2013

Sorry about that, it must be annoying when people don't read the contributing docs!

* similar to existing code and angular's ngView
* cleaned up renderer code to make less ambiguous
* fixes issue where ngClass and other directives are broken on the view elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants