Angular.js: uibModal won't open

Created on 8 Jun 2018  路  6Comments  路  Source: angular/angular.js

I'm submitting a ...

  • [x ] bug report
  • [ ] feature request
  • [ ] other

Current behavior:

Clicking a button which opens a modal results in this error: "TypeError: u is not a function".

Expected / new behavior:

Usually the Modal opens and displays its contents fine. Reverting to AngularJS 1.7.0 makes this error go away.

Minimal reproduction of the problem with instructions:

AngularJS version: 1.7.1

Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Anything else:

In the minified file it takes me to

.provider("$uibModal", function() {
...
    angular.extend(c, {
     $resolve: l.$scope.$resolve
      }, r)),
     c = u(),    // This line
     angular.isFunction(c.$onInit) && c.$onInit()),
     s.open(

So I'd like to believe a change from 1.7.0 to 1.7.1 around here caused the bug.

Most helpful comment

We discussed this and it seems that this clean-up will cause unnecessary pain for several developers (that depend on popular UI libraries, such as ngMaterial and ui-bootstrap - probably others too).

So, despite this being an internal API, we decided to revert the change in 1.7.2 (sorry @thorn0 :grin:).

All 6 comments

They used a private API that was removed in #16580.

You probably wanna open an issue at https://github.com/angular-ui/bootstrap, it might be a good idea to refer to the links provided by @thorn0

We discussed this and it seems that this clean-up will cause unnecessary pain for several developers (that depend on popular UI libraries, such as ngMaterial and ui-bootstrap - probably others too).

So, despite this being an internal API, we decided to revert the change in 1.7.2 (sorry @thorn0 :grin:).

ty

FYI, v1.7.2 has been released.

@gkalpak on behalf of the no-longer-maintained AngularJS ui-bootstrap library, thank you.

Was this page helpful?
0 / 5 - 0 ratings