vendredi 29 avril 2016

Upgrade emberjs script to support latest version

I am using

Emberjs: v1.8.0

and I have the following simple code

<html>
   <head>
      <title>Important data</title>
      <script src="/handlebars.min.js"></script>
      <script src="/jquery-2.1.3.min.js"></script>
      <script src="/ember.min.js"></script>
      <script src="/ember-template-compiler.js"></script>
      <script src="/ember.debug.js"></script>
      <script src="/ember-data.js"></script>
   </head>
   <body>
      <script type="text/x-handlebars">
         
      </script>

      <script type="text/x-handlebars" data-template-name="index">
         
Name         : <font color='blue'></font><br>
City         : <font color='blue'></font><br>
State        : <font color='blue'></font><br>
            <button >Edit</button>

          
Name         : <br>
City         : <br>
State        : <br>
            <button >Done</button>
         
      </script>

      <script type="text/javascript">
         App = Ember.Application.create();
         App.ApplicationRoute = Ember.Route.extend({
            model: function() {
               return [{otherdata:''}];

            }
         });

         App.View = Ember.View.extend({
            templateName: 'index',
            isShowVisible: true,
            actions: {
               importantdata: function(){
                  this.toggleProperty('isShowVisible');
               }
            }
        });

      </script>
   </body>
</html>

The emberjs version used in this script seems to be outdated. And also I heard that the latest version of emberjs(v2.4.x) is working in whole different way.

I want to upgrade the script to support the latest version of emberjs.

Any help for me on this?

It would take much time for me to learn entire latest version of emberjs.

Much appreciated, if anyone has quick solution for me on this.

What are the changes I have to done to make the above script to support latest version of emberjs?




Aucun commentaire:

Enregistrer un commentaire