angularjs - Modal Instance not resolving input -


i trying use angularui modal's , cannot seem figure out why not resolving variables.

function opens modal , modal instance

$scope.openmodal = function (size, cert) {      var modalinstance = $modal.open({         template: 'modalcontent.html',         controller: 'modalinstancectrl',         size: size,         resolve: {             certs: function () {                 return $scope.certification;             }         }    });     modalinstance.result.then(function () {}); }; 

modal controller stuff in here leftover debugging

angular.module('myapp').controller('modalinstancectrl', ['$scope', '$filter', '$modalinstance', function ($scope, $filter, $modalinstance, certs) {       console.log(certs);       var results = $filter('filter')(certs, {id: id})[0];       $scope.cert = results;       $scope.ok = function () {         $modalinstance.close();     }; }]); 

the main issue when gets controller getting undefined certs though should resolved openmodal function. following official angular ui tutorial on how them here: angular ui bootstrap modals

in injection of 'certs' controller, need add name declaration function.

angular.module('myapp').controller('modalinstancectrl', ['$scope', '$filter', '$modalinstance', 'certs', function ($scope, $filter, $modalinstance, certs) {


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -