
- To make a model instance we write a script in html where type is ‘text/ng-template’
- $scope.openModel = function (size) { var modalInstance = $modal.open({ templateUrl: ‘index.html’, controller: ‘indexCtrl’, scope : $scope, size: size, //If you want to pass a service reference to model instance, return it from resolve as given below resolve : { yourService : function(){ return yourService; }, }); }