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

Get rid of angular.is* #902

Merged
merged 5 commits into from
Apr 5, 2017
Merged

Get rid of angular.is* #902

merged 5 commits into from
Apr 5, 2017

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Apr 4, 2017

angular.isDefined(foo) -> foo !== undefined
angular.isUndefined(foo) -> foo === undefined

because these are standard JS now, so no need to use functions, especially since these don't exist in angular(2).

angular.isFoo -> lodash.isFoo (where Foo = String, Array, Number and Function)

because these arent' angular2's responsibility either.

https://www.pivotaltracker.com/story/show/143023099

himdel added 5 commits April 4, 2017 10:14
perl -i -npe 's/!\s*angular.isDefined/angular.isUndefined/g' app/assets/javascripts/**/*.*
perl -i -npe 's/!\s*angular.isUndefined/angular.isDefined/g' app/assets/javascripts/**/*.*
perl -i -npe 's/angular.isDefined\(([^)]*)\)/$1 !== undefined/g' app/assets/javascripts/**/*.*
perl -i -npe 's/angular.isUndefined\(([^)]*)\)/$1 === undefined/g' app/assets/javascripts/**/*.*
perl -i -npe 's/angular.is/_.is/g' app/assets/javascripts/**/*.*
@miq-bot
Copy link
Member

miq-bot commented Apr 4, 2017

Checked commits https://github.com/himdel/manageiq-ui-classic/compare/b79fd25acf1c8c341dff27b7db71252aa69f012d~...6ce7e2e91daaf159043210bf3b47ad422cb9e755 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks good. 🏆

@himdel
Copy link
Contributor Author

himdel commented Apr 4, 2017

Ad CC issues:

  • "You probably misspelled $on("$destroy")": fixed in $scope.$on('destroy') should be '$destroy' #908
  • "unexpected use of undefined": valid warning, undefined is seldom useful, but these would have to be solved one by one and would change the meaning

@himdel himdel closed this Apr 4, 2017
@himdel himdel reopened this Apr 4, 2017
@himdel himdel closed this Apr 4, 2017
@himdel himdel reopened this Apr 4, 2017
@mzazrivec mzazrivec added this to the Sprint 58 Ending Apr 10, 2017 milestone Apr 5, 2017
@mzazrivec mzazrivec merged commit e8f5caa into ManageIQ:master Apr 5, 2017
@himdel himdel deleted the angular-is branch April 5, 2017 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants