Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAttributes

Hierarchy

Indexable

[name: string]: any

this is necessary to be able to access the scoped attributes. it's not very elegant because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656

Index

Properties

$attr

$attr: Object

A map of DOM element attribute names to the normalized name. This is needed to do reverse lookup from normalized name back to actual name.

Methods

$addClass

  • $addClass(classVal: string): void
  • Adds the CSS class value specified by the classVal parameter to the element. If animations are enabled then an animation will be triggered for the class addition.

    Parameters

    • classVal: string

    Returns void

$normalize

  • $normalize(name: string): string
  • Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.

    Also there is special case for Moz prefix starting with upper case letter.

    For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives

    Parameters

    • name: string

    Returns string

$observe

  • $observe<T>(name: string, fn: function): Function
  • Observes an interpolated attribute. The observer function will be invoked once during the next $digest following compilation. The observer is then invoked whenever the interpolated value changes.

    Type parameters

    • T

    Parameters

    • name: string
    • fn: function
        • (value?: T): any
        • Parameters

          • Optional value: T

          Returns any

    Returns Function

$removeClass

  • $removeClass(classVal: string): void
  • Removes the CSS class value specified by the classVal parameter from the element. If animations are enabled then an animation will be triggered for the class removal.

    Parameters

    • classVal: string

    Returns void

$set

  • $set(key: string, value: any): void
  • Set DOM element attribute value.

    Parameters

    • key: string
    • value: any

    Returns void

$updateClass

  • $updateClass(newClasses: string, oldClasses: string): void
  • Adds and removes the appropriate CSS class values to the element based on the difference between the new and old CSS class values (specified as newClasses and oldClasses).

    Parameters

    • newClasses: string
    • oldClasses: string

    Returns void

Generated using TypeDoc