我要寻找一个函数,会做这样的事情在角:角计算表达式就好像它是在HTML
var testValues = {
name: 'John Doe',
number: 15
}
somefunction('Hello, {{name}}, you are {{number}} years old', testValues)
// returns 'Hello, John Doe, you are 15 years old'
我知道$ EVAL做一些与此类似,但它不能有双重大括号内。
试试'$ compile()'...? – malix