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.29k stars 6.73k forks source link

[Feature request] Open modal with a class as component #6489

Open bastienmoulia opened 7 years ago

bastienmoulia commented 7 years ago

Hi,

I use angularJs with ES6 and I think it could be great to open a modal with the component class in addition to its name.

Actually I have to add the component to the angular module

import { AwsomeModalComponent} from "./awsome-modal.component";

angular
  .module("app", [])
  .component("awsomeModal", AwsomeModalComponent);

And call it

$uibModal.open({
  component: "awsomeModal"
});

What i would like is to import the component when I use it.

import { AwsomeModalComponent} from "./awsome-modal.component";

$uibModal.open({
  component: AwsomeModalComponent
});