8000 Async module registration may init components multiple times · Issue #2 · packetloop/angular-webpack · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 21, 2019. It is now read-only.

Async module registration may init components multiple times #2

Closed
nkbt opened this issue Jan 5, 2015 · 2 comments
Closed

Async module registration may init components multiple times #2

nkbt opened this issue Jan 5, 2015 · 2 comments
Assignees
Labels

Comments

@nkbt
Copy link
Contributor
nkbt commented Jan 5, 2015

Angular has internal cache of initialized components. If I include one module as dependency in several modules (one sync, one async) it gives an exception.
The reason - <match> directive was initialized by angular and then by app.register again.

Error: [$compile:multidir] Multiple directives [match, match] asking for new/isolated scope on: 

<input name="confirm" type="password"
  ng-model="password.data.user.password_confirmation"
  placeholder="Confirm Password"
  match="password.data.user.password"
  class="ng-pristine ng-untouched ng-valid”>

I see 2 possible ways. Either find find the way to access that internal Angular cache, so I will not init same directive more then once. Or always use my own app.register to take full control over caching.

@nkbt nkbt added the bug label Jan 5, 2015
@nkbt nkbt self-assigned this Jan 5, 2015
@nkbt
Copy link
Contributor Author
nkbt commented Mar 10, 2015

angular/angular.js#4694 I end up using this solution and keep local copy of modified angularjs with patch applied. Works perfectly.

@nkbt
Copy link
Contributor Author
nkbt commented Aug 3, 2015

Fixed by #3, added modified angular.js source into the project.

@nkbt nkbt closed this as completed Aug 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant
0