compile error, accordion controller required

后端 未结 4 1524
长发绾君心
长发绾君心 2021-01-18 06:04

I met following error in the console when using angular-bootstrap ui. I have angular 1.2.6, bootstrap 3.0, and angular-bootstrap 0.10.0.

Err

4条回答
  •  长情又很酷
    2021-01-18 06:20

    In my case I was using UI-router to redirect to a $state from the controller I defined in the config.router.js of my app. I guess this was triggering before the controller had a chance to acknowledge the directive.

    I just wrapped that redirect in a $timeout:

    $timeout(function () {
        $state.go( 'state.name', { params } );
    }, 0);
    

提交回复
热议问题