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

fix(addStyle): reference window.angular instead of just angular #7176

Closed
wants to merge 1 commit into from
Closed

fix(addStyle): reference window.angular instead of just angular #7176

wants to merge 1 commit into from

Conversation

tomyam1
Copy link
Contributor

@tomyam1 tomyam1 commented Apr 21, 2014

Reference window.angular instead of just angular because when running angular under an environment
where the top-level scope is not the window (nodejs for example), we have to specifically
reference window.angular.

The main reason for this fix is making running angular under nodejs easier.
Some use cases for this:

Signed CLA as Tom Yam

…e insertion of inline css

Reference window.angular instead of just angular because when running angular under an environment
where the top-level scope is not the window (nodejs for example), we have to specifically
reference window.angular.
@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#7176)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@tomyam1 tomyam1 added cla: yes and removed cla: no labels Apr 21, 2014
@tbosch tbosch self-assigned this Apr 21, 2014
@tbosch
Copy link
Contributor

tbosch commented Apr 21, 2014

SGTM. Waiting for Travis to get green...

@tbosch tbosch added this to the Purgatory milestone Apr 21, 2014
@tomyam1
Copy link
Contributor Author

tomyam1 commented Apr 22, 2014

@tbosch Travis is green now.

petebacondarwin pushed a commit that referenced this pull request Apr 28, 2014
…ot a global

The build includes a little script to angular.js, which adds some CSS styles to
the page to support things like ngCloak. This script checks that angular is
not in CSP mode, but before this fix assumed that angular would be in the global
scope.

This commit, references `window.angular` instead of just `angular` because when
running angular in an environment where the top-level scope is not the window
(nodejs for example), we angular is actually a property of `window`.

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

Successfully merging this pull request may close these issues.

3 participants