This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-messages-include raises "Error: [jqLite:nosel]" when including empty file #12941
Closed
Description
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.