# @device
The @device
directive is used to specify a list of device types and to restrict components to run only on the marked (specified) devices. If the currently running device type doesn't match with any of the marked devices, the component with the device markers won't be resolved and calling getComponentByName()
or querySelector
will fail to retrieve the components.
# Device Type
Name | Description |
---|---|
mobile | mobile devices |
tablet | tablet devices |
desktop | desktop |
touch | touchable screen devices |
android | android devices |
iphone | iphones |
ios | devices with IOS OS |
ipad | ipad |
# Example
@device.invert
example