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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -