angularjs - JavaScript runtime error: [$parse:lexerr] Lexer Error: Unexpected next character at columns 128-128 [&] in -
i'm passing querystring function - gets $compiled opens new window. following error
- javascript runtime error: [$parse:lexerr] lexer error: unexpected next character @ columns 128-128 [&]
var url = 'http://.....?&filename=123.doc&user=bob'
var html = link "
var link = $compile(html)($scope)
the function opens new window . doesn't seem '&'
i'm $compiling url , expression can used in ng-click
any ideas i'm doing wrong?
why $compile url, don't see why needed. $compile in angular not compile urls, compiles html-string or dom-tree , compiles/links angular directives used in html.
is solving issue?
in controller:
$scope.myurl = "http://... "; in html:
<a ng-href="{{myurl}}" target="_blank">blabla</a>
Comments
Post a Comment