AngularJS Modal Popup

后端 未结 2 658
天命终不由人
天命终不由人 2021-02-14 15:48

I\'m really new to Angular. I\'m trying to recreate the modal sample at this link https://angular-ui.github.io/bootstrap/ I am having no luck with it! I created a plunker htt

2条回答
  •  梦毁少年i
    2021-02-14 16:11

    You need to fix this line:

    angular.module('crm.ma').controller('ModalDemoCtrl', ModalDemoCtrl, function ($scope, $uibModal, $log) {    
    //  what is this, huh? ------------------------------------^
    

    Correct code:

    angular.module('crm.ma').controller('ModalDemoCtrl', function ($scope, $uibModal, $log) {
    

    You have similar problem with ModalInstanceCtrl.

    You also missing ng-app="crm.ma" attribute.

    Demo: http://plnkr.co/edit/VDhDAHM2beVtYYsJBXoi?p=preview

提交回复
热议问题