jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

Angular Filters Not Working #438

Closed developcreativo closed 7 years ago

developcreativo commented 7 years ago

TrustHtmlFilter is not using explicit annotation and cannot be invoked in strict mode

developcreativo commented 7 years ago
export function TrustHtmlFilter($sce) {
    return function(html) {
        return $sce.trustAsHtml(html);
    };
}
TrustHtmlFilter.$inject = ['$sce'];

Fix

jadjoubran commented 7 years ago

H @vdjkelly Thanks for reporting this bug.

I just fixed it by adding the missing 'ngInject' which takes care of annotating dependency injection

export function TrustHtmlFilter($sce) {
    'ngInject';
    return function(html) {
        return $sce.trustAsHtml(html);
    };
}