ritz078 / ng-embed

An AngularJS filter/directive for embedding emojis, media, maps, tweets, code and services
http://riteshkr.com/ng-embed
MIT License
122 stars 35 forks source link

"TypeError:undefined is not a function" due to $$unwrapTrustedValue() #4

Closed sam2x closed 9 years ago

sam2x commented 9 years ago

Hi,

Thanks for your project. When trying to use the default package, the code generate the following error :

 TypeError: undefined is not a function at link ((http://xxx/js/ng-embed/src/ng-embed.js:768:53)

The error is due to the following line :

      var x = ($filter('embed')(data, options)).$$unwrapTrustedValue();

I have to change it to :

      var x = ($filter('embed')(data, options))

It's working, but that's maybe not the best solution. What's is wrong ? Angular version : 1.4.1 Ng-embed : 2.0.2

sam2x commented 9 years ago

any news ?

ritz078 commented 9 years ago

Hi @sam2x As you can see its working fine here. Have you followed the usage guidelines properly or you have used it differently than shown in the example ?

UPDATE I checked with angular v1.4.1 and its working nicely. I have even updated the demo in the folder with updated version.

ritz078 commented 9 years ago

Hey @sam2x , It will be a great help if you can reproduce this on Plunker

ritz078 commented 9 years ago

Closing this due to inactivity.

abrararies commented 9 years ago

For me, this happens when the embed-data value in the directive is set to an empty string.