问题描述:

I'm getting an error when calling angular bootstrap on an element which has a child element that has already been bootstrapped:

Unknown provider: myServiceProvider <- myService

Here's the call on the child

angular.bootstrap($('#child'), ['mod1']);

And here's the call on the parent

angular.bootstrap($('body'), ['modA', 'modB']);

If I include 'mod1' in the bootstrap call on the parent then it seems to work.

Is what I'm trying to do here bad practice?

网友答案:

The comments above the bootstrap function say that apps cannot be nested. Search 'nested' here

相关阅读:
Top