angularjs - I couldn't using bootstrap $uibModal is undefined -


i trying use bootstrap couldn't app.js

i want use bootstrap users module

  angular.module('authentication', []);     angular.module('home', []);     angular.module('menubar',[])     angular.module('register',[])     angular.module('register',[])     angular.module('uservalidation',[])     angular.module('users',['ui.bootstrap'])     angular.module('smart-table',[])     angular.module('ui.bootstrap',[])      angular.module('mb', [         'authentication',         'home',         'ngroute',         'ngcookies',         'menubar',         'register',         'uservalidation',         'users',         'smart-table',         'ui.bootstrap'     ]) 

and added js file in index.jsp

 <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.14.1.js"></script> 

and controller

      'use strict';     angular.module('users').controller('userslistcontroller', ['userservice', function (service, $uibmodal) {        var ctrl = this;        this.displayed = [];       // filter user type       this.obj1={usertype: '0'};       this.obj2={usertype: '1'};       this.obj3={usertype: '2'};        this.isshown = function(type) {           return type === this.filteroption;       };        this.filteroption;         this.openuser = function (row) {              var modalinstance = $uibmodal.open({                     animation: $scope.animationsenabled,                     templateurl: 'js/users/user-modal.jsp',                     controller: 'monitoringmodalcontroller',   );      }; 

but when run error:

angular.js:12520 typeerror: cannot read property 'open' of undefined

you forget $uibmodal inside inline annotation.

['userservice', '$uibmodal', function (service, $uibmodal)                     ^^^^ 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -