Skip to content

Instantly share code, notes, and snippets.

@timanrebel
Created June 5, 2013 16:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timanrebel/5715080 to your computer and use it in GitHub Desktop.
Save timanrebel/5715080 to your computer and use it in GitHub Desktop.
Did you know it is possible to create custom XML tags in Alloy and use them?
// <<MyElement> becomes Ti.UI.createMyElement, so that doesn't work
Ti.UI.createMyElement({
id: 'myId'
});
// But give it a namespace and all of a sudden, it is translated to:
Sc.UI.createMySecondElement({
id: 'mySecondId'
})
<Alloy>
<MyElement id="myId" />
<MySecondElement ns="Sc.UI" id="mySecondId" />
</Alloy>
@viezel
Copy link

viezel commented Jun 5, 2013

very nice! I did not know that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment