Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

resource bug #344

Closed
sramam opened this issue May 19, 2011 · 9 comments
Closed

resource bug #344

sramam opened this issue May 19, 2011 · 9 comments

Comments

@sramam
Copy link

sramam commented May 19, 2011

The attached test script which uses a resource to make a simple json call to YouTube
started to fail when I upgraded from 0.9.12 to 0.9.15.

I've tracked it down to the following - first introduced in 0.9.13.

Including jQuery masks the problem.

$ diff angular-0.9.15.js angular-0.9.15a.js
3287c3287
-       var script = jqLite('<script>')

---
+       var script = jqLite(rawDocument.createElement('script'))
@vojtajina
Copy link
Contributor

Could you provide us the test script you did mention please ?

I've just tried jqLite('<script>') and jqLite(document.createElement('script')) both in FF, Chrome, Opera.
They both seem to work fine, so I can't see the issue...

@sramam
Copy link
Author

sramam commented Jun 3, 2011 via email

@vojtajina
Copy link
Contributor

Just tried in Chrome, Opera, FF3, FF4, IE8, but I can't reproduce any problem.
Works fine with 0.9.15 as well as 0.9.12 for me.
Which OS and browser do you use ?

Just couple of tips for you:

  • remove the comma on line 17 (IE can't handle that)
  • use ng:src instead of src to avoid dummy request for non-existing image

@sramam
Copy link
Author

sramam commented Jun 3, 2011

hmm... perhaps it's because I am opening the file in the browser versus
running a server.
Happens on both FF4 and Chrome - I'm trying this on Windows 7.

As mentioned in the issue, I did narrow it down to that one change.

There seem to be multiple occurances of both styles of creating elements.
I'd much prefer that support for files opened in the browser exist when it's
possible.

-shishir

On Fri, Jun 3, 2011 at 6:09 AM, vojtajina <
[email protected]>wrote:

Just tried in Chrome, Opera, FF3, FF4, IE8, but I can't reproduce any
problem.
Works fine with 0.9.15 as well as 0.9.12.

Just couple of tips for you:

  • remove the comma on line 17 (IE can't handle that)
  • use ng:src instead of src to avoid dummy request for non-existing
    image

Reply to this email directly or view it on GitHub:
#344 (comment)

Imagine there were no hypothetical situations.

@vojtajina
Copy link
Contributor

Well, that's the case. It has nothing to do with angular.

You should be running it from server, but if you really need it, run Chrome with one of these options, should solve the problem:

C:\path\to\chrome\chrome.exe --disable-web-security
C:\path\to\chrome\chrome.exe --allow-file-access-from-files

Anyway, closing this issue as I hope it's not actual issue.

@sramam
Copy link
Author

sramam commented Jun 3, 2011

I understand your perspective on this.

Though I must say that including jquery before angular solves the issue,
leading me to believe
there is a workaround which does not involve meddling with flags to the
browser.

Since the act of creating DOM elements within ng:repeat is such an integral
part of angular,
this will effectively inhibit usage of angular from file.

It's a small convenience - and from the mailing lists it seems, it's not
just me that started out this way.

With that, I'll rest my argument and live with whatever you gentle folks
decide.

On Fri, Jun 3, 2011 at 8:37 AM, vojtajina <
[email protected]>wrote:

Well, that's the case. It has nothing to do with angular.

You should be running it from server, but if you really need it, run Chrome
with one of these options, should solve the problem:

C:\path\to\chrome\chrome.exe --disable-web-security
C:\path\to\chrome\chrome.exe --allow-file-access-from-files

Anyway, closing this issue as I hope it's not actual issue.

Reply to this email directly or view it on GitHub:
#344 (comment)

Imagine there were no hypothetical situations.

@sramam
Copy link
Author

sramam commented Jun 3, 2011

Now I am feeling like a total pest. Apologies.

But these files on appengine exhibit the same problem. Though I must say
that
the resource post seems to be failing. It looks a little different than what
I
was running these from local disk.

http://a-few-good-strokes.appspot.com/static/deadpan/resource_test.12.html
http://a-few-good-strokes.appspot.com/static/deadpan/resource_test.15.html

diff resource_test.12.html resource_test.15.html
4c4
< <script src="http://code.angularjs.org/angular-0.9.12.js"

ng:autobind></script>

    <script src="http://code.angularjs.org/angular-0.9.15.js"

ng:autobind></script>

I've tested Chrome and FF4 on Win7.

On Fri, Jun 3, 2011 at 9:12 AM, Shishir Ramam [email protected] wrote:

I understand your perspective on this.

Though I must say that including jquery before angular solves the issue,
leading me to believe
there is a workaround which does not involve meddling with flags to the
browser.

Since the act of creating DOM elements within ng:repeat is such an integral
part of angular,
this will effectively inhibit usage of angular from file.

It's a small convenience - and from the mailing lists it seems, it's not
just me that started out this way.

With that, I'll rest my argument and live with whatever you gentle folks
decide.

On Fri, Jun 3, 2011 at 8:37 AM, vojtajina <
[email protected]>wrote:

Well, that's the case. It has nothing to do with angular.

You should be running it from server, but if you really need it, run
Chrome with one of these options, should solve the problem:

C:\path\to\chrome\chrome.exe --disable-web-security
C:\path\to\chrome\chrome.exe --allow-file-access-from-files

Anyway, closing this issue as I hope it's not actual issue.

Reply to this email directly or view it on GitHub:
#344 (comment)

Imagine there were no hypothetical situations.

Imagine there were no hypothetical situations.

@vojtajina
Copy link
Contributor

Hey sramam, you are not pest !!!

I did analyse it bit more deeply and there is an issue in jqLite.

I created new issue for that, as it's related to jqLite more than resource: #369

Thank you very much.

@sramam
Copy link
Author

sramam commented Jun 6, 2011

Thank you for taking this forward.
-shishir

On Mon, Jun 6, 2011 at 6:22 AM, vojtajina <
[email protected]>wrote:

Hey sramam, you are not pest !!!

I did analyse it bit more deeply and there is an issue in jqLite.

I created new issue for that, as it's related to jqLite more than resource:
#369

Thank you very much.

Reply to this email directly or view it on GitHub:
#344 (comment)

Imagine there were no hypothetical situations.

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