angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

$UIModal TypeError: ctrlInstantiate is not a function - 1.7.1 Bower Angular #6708

Closed egamboa closed 6 years ago

egamboa commented 6 years ago

There is no later option: ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs);

https://github.com/angular/bower-angular

1.7.1 has no later :(

PLEASE READ

As per the README, this project is no longer being maintained. Any issues entered will remain uninvestigated and unresolved.

We thank you for your contributions over the years. This library would not have been successful without them.

jelmerjellema commented 6 years ago

That's what you get when you use a private api.

I see there is no later in the 1.7.1 branch, but is does seem to appear in the master-snapshot branche (https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L84). Would this mean there will be a fix in AngularJS soon? I wouldn't know...

jelmerjellema commented 6 years ago

Filed an issue with angularjs https://github.com/angular/angular.js/issues/16598

simonguertin commented 6 years ago

Hi, I am not sure what happened in my project. This is happening to me too. Can I just force an old version to fix the issue ? But what ?

jelmerjellema commented 6 years ago

Hi, Angularjs will fix this in 1.7.2 (https://github.com/angular/angular.js/issues/16594). For now I just fixed "angular": "1.7.0" in my bower.json en did a bower install.

egamboa commented 6 years ago

Correct, you need to go back. I have a log for each test I run so I was able to get a list of all previous version, this was caused by the release of angular 1.7.1

simonguertin commented 6 years ago

Thanks, I am trying in bower.json: "dependencies": { "angular-bootstrap": "^2.2.0", "angular-lazy-img": "^1.1.0", "angular": "1.7.0", ...

"resolutions": { "angular-bootstrap": "^2.2.0", "angular": "1.7.0" }

but something keeps installing angular 1.7.1

jelmerjellema commented 6 years ago

Yeah, for example angular-bootstrap itself asks for angular ^1.4.0, which resolves to 1.7.1. I removed the resolution for angular, and then did

bower install --save angular
!1

Bower asks for which resolution to use, and you take the one explicitly mentioned. The exclamation mark says "save this". Bower.json looks the same as above afterwards, but then angular 1.7.0 is installed. If this does not help, just remove bower_components/angular and do bower install.

egamboa commented 6 years ago

Try using angular-bootstrap: 1.3.3 That is working for me.

simonguertin commented 6 years ago

thanks a lot! I got it to work now.

egamboa commented 6 years ago

@jelmerjellema what will be the latest version that works with 1.7.0? I guess is better than having an old like our project.

jelmerjellema commented 6 years ago

What do you mean? The newest version of ui-bootstrap works with 1.7.0

egamboa commented 6 years ago

TY, that's it.

jelmerjellema commented 6 years ago

Angular 1.7.2 has been released now

imrvelj commented 6 years ago

Can confirm - works with 1.7.2