Skip to content

treygriffith/oz-if

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oz-if

Boolean show/hide tag for Oz.

Installation

Using component:

$ component install treygriffith/oz-if

Using a script tag (UMD compatible)

<script src="./oz-if.min.js"></script>

Usage

This node will be hidden if the property is falsey, or not if it's truthy. Does not change context for child nodes.

Notation:

<div oz-if="person.active"></div>

Example:

var context = {
  person: {
    name: 'Tobi',
    active: true
  }
};
<div oz-if="person.active">
  <span oz-text="person.name">Tobi</span>
</div>

License

MIT

About

Boolean show/hide tag for Oz

Resources

Stars

Watchers

Forks

Packages

No packages published