use directive to parse and format model value