Your first example won’t work. You cannot use CF expressions (or variables) inside a static document (like .html, by default).
If you want the call to be made through the framework, you’ll need to use to correct URL to access the framework (rather than the view file directly). By default, the URL would be something like…