-
Notifications
You must be signed in to change notification settings - Fork 725
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
[RFR] Angular 1.6 #1297
[RFR] Angular 1.6 #1297
Conversation
dde7f79
to
cfe6b8b
Compare
@fzaninotto @jpetitcolas @Phocea Ready for comment! It works on ng-admin-demo too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also bump angular-mocks version to 1.6.1
@@ -15,13 +15,13 @@ | |||
], | |||
"dependencies": { | |||
"admin-config": "~0.12.1", | |||
"angular": "~1.5.11", | |||
"angular": "~1.6.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align angular-mocks version with this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Looking good. |
On my legacy project, I have some For ref. angular/angular.js#14814 |
For info the only 2 issues I got moving to 1.6.1:
might be worth mentioning in the release notes (its explained here) |
Ok, it works well on my legacy project! The error You're right, I'll update the doc. |
Hey, I found this as some of the very few places where there is some help.
when I'm trying to use this in another module like below
I get the error TypeError: Function.prototype.bind.apply(...) is not a constructor in my console.
This error has been haunting me now. Can't seem to get a hang of it. Any advice? |
Hi @nikhildev, This isn't the place for that but as explained on this angular issue, somewhere on your code you define a service, provider or controller with an arrow function I don't see anything like that in your comment but I suggest you to search ALL If it can't help, ping me on Gitter https://gitter.im/marmelab/ng-admin |
|
||
To do so you can follow the Angular Migration Guide [from 1.4 to 1.5](https://docs.angularjs.org/guide/migration#migrating-from-1-4-to-1-5) then [from 1.5 to 1.6](https://docs.angularjs.org/guide/migration#migrating-from-1-5-to-1-6). | ||
|
||
There are the major changes we've faced: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/There/Here/
As requested by @jpetitcolas at #1297 (comment)
@@ -1,5 +1,36 @@ | |||
# Upgrade to 1.0 | |||
|
|||
## Angular 1.6 | |||
Ng-admin is now ready for Angular 1.6 for security reasons and we strongly recommend you to migrate too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Ng/ng/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ for security reasons and we strongly recommend you to migrate too./ instead of 1.4, mainly for security reasons. We advise you to update your application too./
As requested by @jpetitcolas at #1297 (comment)
## Angular 1.6 | ||
Ng-admin is now ready for Angular 1.6 for security reasons and we strongly recommend you to migrate too. | ||
|
||
To do so you can follow the Angular Migration Guide [from 1.4 to 1.5](https://docs.angularjs.org/guide/migration#migrating-from-1-4-to-1-5) then [from 1.5 to 1.6](https://docs.angularjs.org/guide/migration#migrating-from-1-5-to-1-6). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ then/, then/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/To do so/To do so,/
+$http.then(successFn, errorFn); | ||
``` | ||
|
||
- No more arrow functions on services and controllers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/on/in/
As requested by @jpetitcolas at #1297 (comment)
$locationProvider.hashPrefix(''); | ||
``` | ||
|
||
- $http no longer support its `.success` and `.error` functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/$http/$http
/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/no longer support/doesn't support/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/functions/functions anymore/
As requested by @jpetitcolas at #1297 (comment)
$locationProvider.hashPrefix(''); | ||
``` | ||
|
||
- $http doesn't support its `.success` and `.error` functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/$http/$http
/
|
||
Here are the major changes we've faced: | ||
|
||
- The [default hash-prefix changed from `#/` to `#!/`](https://docs.angularjs.org/guide/migration#commit-aa077e8). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/- //
As requested by @jpetitcolas at #1297 (comment)
@jpetitcolas Reviewed |
Fix #1298
TODO