Khalid Bajwa
Khalid Bajwa

Reputation: 173

Evaluated expression not being parsed after updating to angular 1.2.5

This is the syntax i had with 1.0.8

<div ng-click="go('/albumDetail/{{album.albumID}}')">

And it worked perfectly. However, after updating to 1.2.5 (which also involved using the newly seperated routing module, not sure if thats related or not), album.albumID is not being parsed and is being sent as is. What is hapenning here ?

Upvotes: 0

Views: 69

Answers (1)

miqh
miqh

Reputation: 3664

1.2 versions of Angular disallow interpolations inside DOM event handlers.

(cf. docs.angularjs.org/guide/migration)

Instead of using interpolation, you could just use plain JavaScript for the event handler expression to form your parameter:

go('/albumDetail/' + album.albumID)

Upvotes: 1

Related Questions