Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular1.0 unmouted卸载重新进入时会有问题app already bootstraped with this element. #1239

Open
260178 opened this issue Jun 2, 2024 · 0 comments
Labels

Comments

@260178
Copy link

260178 commented Jun 2, 2024

angular1.0没有对应的platformBrowserDynamic Api,通过angular.bootstrap(dom, ['module']来手动启动,
卸载时:
window.unmount = () => {
const injector = angular.eleent(domElement).injector();
const rootScope = $injector.get('rootScope');
rootScope.$destroy();
}
再次进入自应用挂载时:
执行angular.bootstrap(dom, ['module']报错app already bootstraped with this element.
把dom清除重新建立又报另一个错:
【ngTransclude:orphan] Illegal use of ngTransclude directive in the template!No parent directive that requires a transclusion found.Element:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants