In the upcoming sections, we will show a simple modal solution loading content from a simple controller using the Bootstrap UI, and also an alternative way to extend it using a custom external template demonstrating the flexibility of custom directives with the Bootstrap UI.
As a starting point, we will use the
generator-angm; the baseline code will be the default home directory.
At this point, we assume that you have the generator installed on your development environment and a project already started.
Place the following highlighted code in the
homeCtrl.jsfile in the home directory:
/** * @ngdoc function * @name app.controller:HomeCtrl * @description * # HomeCtrl * Controller of the app */ angular.module('bootstrap-ui-directives') // Passing the $modal to controller as dependency .controller('HomeCtrl...