What is the difference between $parse
, $interpolate
and $compile
services?
For me they all do the same thing: take template and compil
Here is the cute explanation.
var img = img/{{name}}.{{extension}}
$parse - > (name,extension) = > vimal , .jpg
$interpolate -> use angular $parse and convert into string -> img/vimal.jpg
$compile -> can turn html string img/vimal.jpg into live DOM so new img tag will be added inside our DOM with all prototype that a img tag have.