Interpolation should call toString on objects #11406
Description
The string value is what is going to be used in the rendering of the information, but this doesn't seem to be respected.
http://plnkr.co/edit/ZLmiavC9lSlKj1b6cQJk?p=preview
For a real-world use-case: We'd like to return goog.Uri instances from our controller and have angular appropriately format them in the template, but it doesn't work -- it seems like the uri instances are compared by identity instead of string value (even though only string value will affect what the user sees), which I think was causing infinite loops. In the plunkr above I cannot get the right information to show up without manually stringifying first.
Right now our workaround is to call toString()
or + ""
manually within the controller, but this is just visual noise... it also is incentive to pass around strings instead of js objects, which I think would obscure the intent of the code.