Strudel API

Decorators

@Component

@Evt

@El

Instance Properties

Instance properties are injected into Component default constructor, so changing the constructor for class is forbidden.

$element

$data

Instance Methods / Events

$teardown

$emit

$on

$off

Instance Methods / Lifecycle Hooks

All lifecycle hooks have their this context bound to the instance. All of them have Instance Properties available.

beforeInit

init

beforeDestroy

destroy

DOM API

Note: Element is internal class for handling DOM manipulation that simulates jQuery but is 800% lighter, below is a reference of available methods. Other methods need to be accessed through DOM API. this.$element and all elements found using @El decorator are Element instances.

Element

Traversing

find

children

closest

parent

eq

first

array

Filtering

filter

map

each

is

Manipulation

append

prepend

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. Additional data can be provided, which will be used for populating the html

remove

text

html

attr

prop

data

addClass

removeClass

toggleClass

Events

trigger

on

off