Skip to content
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

Provide option for Xray to be turned off in render options #39

Merged
merged 1 commit into from Mar 7, 2014
Merged

Provide option for Xray to be turned off in render options #39

merged 1 commit into from Mar 7, 2014

Conversation

mattheworiordan
Copy link
Contributor

AngularJS does not work when the templates are augmented so this commit allows the augmentation to be turned off with the option xray: false passed to the render statement.

Please note that when running your test suite currently, spec/xray/middleware_spec.rb:69 fails every time. This was failing before and after my tests were added.

AngularJS does not work when the templates are augmented so this commit allows the augmentation to be turned off with the option xray: false passed to the render statement.
@brentd
Copy link
Owner

brentd commented Mar 6, 2014

Thanks so much for the PR, @mattheworiordan.

Could you elaborate on what exactly is happening with Angular? I'm using xray in a project that uses Angular pretty extensively and to my knowledge we haven't encountered this issue. Is this when rendering a template inside a <script type="text/ng-template"> and including it with ng-include, or via XHR, or what?

Having the option to disable xray seems nice but in a perfect world we could fix the root issue here, so I'd like to at least know what's up. Thanks!

@brentd
Copy link
Owner

brentd commented Mar 6, 2014

Also thanks for the heads up on the test suite - I've been neglecting it. Thanks for writing tests.

@mattheworiordan
Copy link
Contributor Author

I didn't experience the issue directly, one of my colleagues did. I will ask him to post what happened in here.

@dpiatek
Copy link

dpiatek commented Mar 7, 2014

@brentd The problem refers to this angular error: http://docs.angularjs.org/error/$compile/tplrt. It only happens when you try to render inside <script type="text/ng-template"> and try to pull it into a directives templateUrl. I'm quite sure only directive templates require a single root node, so depending on your setup this might never happen.

@brentd
Copy link
Owner

brentd commented Mar 7, 2014

@dpiatek OK, great. Figured it was something related to root node expectation. Yet another reason to look into #24.

I'm going to go ahead and land this PR, but hopefully fix this gotcha altogether for 0.2.

brentd added a commit that referenced this pull request Mar 7, 2014
Provide option for Xray to be turned off in render options
@brentd brentd merged commit 22eb2b1 into brentd:master Mar 7, 2014
@dpiatek
Copy link

dpiatek commented Mar 10, 2014

@brentd hi mate, thanks for a quick merge. Would you mind bumping the version to 0.1.13?

@brentd
Copy link
Owner

brentd commented Mar 10, 2014

@dpiatek done, sorry for the delay!

@dpiatek
Copy link

dpiatek commented Mar 11, 2014

@brentd sweet, thanks!

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.

3 participants