-
Notifications
You must be signed in to change notification settings - Fork 90
This Fixes #85 'angular.merge is not a function .controller' #88
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
Conversation
Need some tests for |
Also, why don't we just use |
The extendDeep copy does not clone the second argument's (defaultConfig) fields when copying to the dst object. This causes the defaultConfig to be modified if the dest object is modified for fields that are objects or arrays. |
"Also, why don't we just use angular.extend() instead of angular.merge()?" angular.extend() doesn't do a deep copy. |
"Need some tests for pfUtils." |
No they don't, they verify that
|
Then what about |
Underscore extend is a shallow copy, we need a deep copy. pfUtils is need for those customers who are < angular-js 1.4 and are using underscore (not lodash). In this case, we need to make our own 'extendDeep' function. |
|
||
angular.module('patternfly.utils').constant('pfUtils', { | ||
combine: function (source1, source2) { | ||
var retValue; |
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.
Would prefer to see this called merge but otherwise LGTM
How long will we support < angular 1.4? Should we file an issue to get rid of pfUtils at some point in the future? I don't think we want to support this indefinitely and it introduces extra dependencies that will not be needed once people upgrade. |
3c13028
to
3aad6e6
Compare
Hi, I believe my latest push addressed all issues. |
Hi @jeff-phillips-18, latest push address you last comment -thanks |
This Fixes #85 'angular.merge is not a function .controller'
No description provided.