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

Doesn't work with latest version of angular sanitize #111

Open
shoebox639 opened this issue Mar 8, 2017 · 4 comments
Open

Doesn't work with latest version of angular sanitize #111

shoebox639 opened this issue Mar 8, 2017 · 4 comments

Comments

@shoebox639
Copy link

shoebox639 commented Mar 8, 2017

I'm using angular-localize#1.2.1 with angular#1.2.28. The bower.json dependencies is as follows:

"dependencies": {
    "angular": ">=1.2 < 2",
    "angular-cookies": ">=1.2 < 2",
    "angular-sanitize": ">=1.2 < 2"
  }

This lead to the library not working recently because it installed angular-sanitize#1.6.3, which depends on angular 1.6. I get the following error from it.

  TypeError: undefined is not a constructor (evaluating 'angular.module('ngSanitize', [])
    .provider('$sanitize', $SanitizeProvider)
    .info({ angularVersion: '1.6.3' })')
  at [sic]/bower_components/angular-sanitize/angular-sanitize.js:557

I think this will break for everyone not using angular 1.6, as info() was only added to angular.module in 1.6.

@shoebox639
Copy link
Author

A workaround is to add "angular-santize": "~1.2" to my bower.json, which forces the right version.

@goody
Copy link

goody commented Mar 15, 2017

Had to do the same thing with angular-cookies. Locked both of them in my bower.json:

"angular-sanitize": "1.6.2",
"angular-cookies": "1.6.2",

Seems it will affect anyone running ng < 1.6.3/latest.

@andrewsmalek
Copy link

Or you may simply switch to the latest version of Angular-Localization v1.6 which do support the latest angularJS, angular-sanitize and angular-cookies.
you can download it from here :
https://drive.google.com/file/d/0B6ppbyCzTs4tOUpPSUhWYTZTVmc/view?usp=sharing

@Carnid
Copy link

Carnid commented May 10, 2017

I have made a fork here
It incorporates the latest changes to work with 1.6. It also adds a feature for nested json language files.
You can install it via bower using bower install angular-localization-spiria --save
Let me know if there are any issues.

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

No branches or pull requests

4 participants