W3cubDocs

/Angular.js 1.5

Improve this Doc View Source $interpolateProvider

  1. $interpolate
  2. provider in module ng

Used for configuring the interpolation markup. Defaults to {{ and }}.

This feature is sometimes used to mix different markup languages, e.g. to wrap an Angular template within a Python Jinja template (or any other template language). Mixing templating languages is very dangerous. The embedding template language will not safely escape Angular expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS) security bugs!

Methods

  • startSymbol([value]);

    Symbol to denote start of expression in the interpolated string. Defaults to {{.

    Parameters

    Param Type Details
    value
    (optional)
    string

    new value to set the starting symbol to.

    Returns

    stringself

    Returns the symbol when used as getter and self if used as setter.

  • endSymbol([value]);

    Symbol to denote the end of expression in the interpolated string. Defaults to }}.

    Parameters

    Param Type Details
    value
    (optional)
    string

    new value to set the ending symbol to.

    Returns

    stringself

    Returns the symbol when used as getter and self if used as setter.

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.5.11/docs/api/ng/provider/$interpolateProvider