$sce.parseAs()

parseAs(type, expression);

Converts Angular expression into a function. This is like $parse and is identical when the expression is a literal constant. Otherwise, it wraps the expression in a call to $sce.getTrusted(type, result)

Parameters

Param Type Details
type string

The kind of SCE context in which this result will be used.

expression string

String expression to compile.

Returns

function(context, locals)

a function which represents the compiled expression:

  • context â {object} â an object against which any expressions embedded in the strings are evaluated against (typically a scope object).
  • locals â {object=} â local variables context object, useful for overriding values in context.
doc_AngularJS
2016-03-29 16:10:44
Comments
Leave a Comment

Please login to continue.