/// /// var btfModal: angularModal.AngularModalFactory; // Using template URL function withTemplateUrl() { btfModal({ controller: 'SomeController', controllerAs: 'vm', templateUrl: 'some-template.html' }); } // Using template function withTemplate() { btfModal({ controller: 'SomeController', controllerAs: 'vm', template: '
' }); } // Using controller function function withControllerAsFunction() { btfModal({ controller: function () {}, template: '
' }) } // Using constructor function function withControllerClass() { class TestController { constructor(dependency1:any, dependency2:any) {} } btfModal({ controller: TestController, template: '
' }); } // With container as selector function withContainerAsString() { btfModal({ template: '
', container: '.container' }); } // With container as jQuery element function withContainerAsJquery() { var container: JQuery = $('body'); btfModal({ template: '
', container: container }); } // With container as DOM Element function withContainerAsDom() { var container: Element = document.getElementById('container'); btfModal({ template: '
', container: container }); } // With container as DOM Element Array function withContainerAsDomArray() { var container: Element[] = [document.getElementById('container'), document.getElementById('container2')]; btfModal({ template: '
', container: container }); } // With container as function function withContainerAsFunction() { btfModal({ template: '
', container: function() {} }); } // With container as array function withContainerAsArray() { btfModal({ template: '
', container: ['1', 2] }); } // Calling return values function callingValues() { var modal: angularModal.AngularModal = btfModal({ template: '
' }); modal.activate().then(() => {}, () => {}); modal.deactivate().then(() => {}, () => {}); var isActive: boolean = modal.active(); }