This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(translateDirective): fixes bug that directive writes into scope
Fixes #128
- Loading branch information
4e06468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised by this fix. Does this mean that the translate directive is going to write values (e.g. translationId) into the user's scope? Don't you expect clashes when multiple translate directive instances share the same scope? Sorry if these comments don't make sense.
4e06468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elemoine your comments make totally sense! Sorry man, it's very late here in germany. Shit, that's why I originally created a child scope in translate directive. We need another solution =(
4e06468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a new scope made sense indeed.
4e06468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elemoine Yea, will roll back that stuff. Any other idea how to fix the problem?
4e06468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I wouldn't not fix it :) Because there are application-level solutions to "fix" it:
Use a function:
Use the "have a . in your models" technique (mentioned in the official doc):
4e06468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.