You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
As shown in http://plnkr.co/edit/VFrt4rXZaK194zwJg0P2?p=preview, the ng-messages-include directive attempts to call angular.element() with the content of the file (empty or spaces) and, because jqLite interprets every string that does not start with "<" as a selector, it will raise an error.
The error will be raised if the included file is not empty but starts with a text. I am not sure if angular-messages should handle the case where the included file contains text outside a <div ng-message="..."></div>, but I believe it should handle empty files gracefully.
The text was updated successfully, but these errors were encountered:
I believe it shouldn't throw an error for this case.
I faced this issue when testing a custom directive. As I am adding messages from multiple files (i.e multiple <div ng-messages-include="..."></div>, I would like to test that they're added, and that they're added in the correct order. For the first case (just testing that messages are added from some custom sources), I just fill one of the sources with messages and leave the other ones empty.
It's easy to workaround (I can just add <div></div> to the 'empty' sources), but I wonder if it should fail at all.
As shown in http://plnkr.co/edit/VFrt4rXZaK194zwJg0P2?p=preview, the ng-messages-include directive attempts to call
angular.element()
with the content of the file (empty or spaces) and, because jqLite interprets every string that does not start with "<" as a selector, it will raise an error.The error will be raised if the included file is not empty but starts with a text. I am not sure if angular-messages should handle the case where the included file contains text outside a
<div ng-message="..."></div>
, but I believe it should handle empty files gracefully.The text was updated successfully, but these errors were encountered: