String interpolation for dynamic filter object generation in AngularJS 1.7.5

I'm currently upgrading from AngularJS 1.4.7 to 1.7.5. Previously, we used a weird hack to create a filter object inside of a directive.

<directive field="'key1=value1, key2=value2'"></directive>

This attribute (field) is then used in the angular template for the directive

<template attr="item in list | filter: { {{field}} }"></template>

Previously in 1.4.7, this would take the string in field and then substitute it into the second template, resulting in a proper object passed into an angular filter:

<template attr="item in list | filter: { key1=value1, key2=value2 }"></template>

However, in 1.7.5, this no longer works and now results in a syntax error. Is there a new way to do this? Is there a better way to do this kind of filter generation?

For the case where we're only filtering on a single key/value pair, the following does work:

<directive field="'key1'"></directive>
<template attr="item in list | filter: { [field]:value }"></template>

which gives us

<template attr="item in list | filter: { key1:value }"></template>