Does Polymer Dart have something similar to Angular's ng-switch? -
is there in polymer switch
statement in markup? have component want build, , have ton of "ifs" display code. wondering if polymer has angular's ng-switch
?
example:
<div ng-switch="selection"> <div ng-switch-when="settings">settings div</div> <div ng-switch-when="home">home span</div> <div ng-switch-default>default</div> </div>
in polymer have `
<template if="{{selection == 'settings'}}">....</template> <template if="{{selection == 'home'}}">....</template> <template if="{{!(selection == 'settings' && selection == 'home')}}">....</template>
which not terse ng-switch
.
in polymer 0.8 <template if...>
, <template repeat...>
built custom element. same can done switch.
Comments
Post a Comment