amergin
amergin

Reputation: 992

Use components from both angular-strap and ui-bootstrap

How can I selectively use components from both angular-strap and ui-bootstrap without them colliding and breaking my application?

Example:

  1. Include custom build of ui-bootstrap which only includes $modal implementation.
  2. Try to use $alert from angular-strap.
  3. Angular-strap throws an error because it relies on $modal, which is now supplied by ui-bootstrap and obviously has different functionality.

This all sounds like a case that could've been avoided by better naming conventions, but is there a way around the problem without modifying the library code?

Upvotes: 2

Views: 261

Answers (1)

therealscifi
therealscifi

Reputation: 382

I would highly suggest that you elect to use one of the libraries, rather than both. I was in the same boat as you, but I ended up choosing AngularStrap because of some rather large issues that come up when both are used.

The unexpected issues, even when selectively picking components, took way too much time and effort to solve to make it worth keeping.

Each framework can do exactly what the other does in 'modals' but it might take a little bit of a different approach. I suggest you pick one framework, and ask whatever question you need to make it work when you get stuck.

IMHO, of course.

Upvotes: 1

Related Questions