How to implement MVC pattern in Polymer 1.0? -


can define controller polymer element? example, have listview element.now want implement onclickevent() in controller keep business / other logic separate view. there view-controller binding available in polymer.?

the basic structure of polymer element embeds mvc solution you, doesn't it?

for example, general structure is:

<dom-module id="my-module">   <!-- imports go here -->   <link rel="import" href="../bower_components/example-imported-element/example-imported-element.html">   <style>     ...   </style>   <template>     <paper-button on-click="myfunc"></paper-button>   </template>   <script>     (function() {         polymer({           is: "my-module",           ...           myfunc: function() {             // stuff           },           ...         });       }()   </script> </dom-module> 

so inside <template> tags views , inside polymer() function "controller" isn't it? (even thought it's not formally labeled way.) or did have else in mind?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -