26 lines
1.3 KiB
HTML
Executable file
26 lines
1.3 KiB
HTML
Executable file
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/ng/btstrpd.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">App Already Bootstrapped with this Element</code>
|
|
<div><span class="hint">error in component <code ng:non-bindable="">ng</code>
|
|
</span>
|
|
</div>
|
|
</h1>
|
|
<div><pre class="minerr-errmsg" error-display="App Already Bootstrapped with this Element '{0}'">App Already Bootstrapped with this Element '{0}'</pre>
|
|
<h2 id="Description">Description</h2>
|
|
<div class="description"><div class="ng-page ng-btstrpd-page"><p>Occurs when calling angular.bootstrap on an element that has already been bootstrapped.</p>
|
|
<p>This usually happens when you accidentally use both <code>ng-app</code> and <code>angular.bootstrap</code> to bootstrap an application.</p>
|
|
<pre><code><html>
|
|
...
|
|
<body ng-app="myApp">
|
|
<script>
|
|
angular.bootstrap(document.body, ['myApp']);
|
|
</script>
|
|
</body>
|
|
</html></code></pre>
|
|
<p>Note that for bootrapping purposes, the <code><html></code> element is the same as <code>document</code>, so the following will also throw an error.</p>
|
|
<pre><code><html>
|
|
...
|
|
<script>
|
|
angular.bootstrap(document, ['myApp']);
|
|
</script>
|
|
</html></code></pre>
|
|
</div></div>
|
|
</div>
|