Languages

Menu
Sites
Language
Tizen application wearable web applications design patterns and library can be used
Hello, We want to make a complex and reusable application for tizen wearable gear watch. I want to know if I can use AngularJS or any other framework in web wearable application? Regards, Shraddha

Responses

2 Replies
Iqbal Hossain

Yes absulately you can use AngularJS as well most of the others JS frameworks. 
Using AngularJS:-

Step 1: Add angular.min.js and a js controller to your project

Step 2: Add the library and controller path to the index.html

<script src="js/angular.min.js"></script>
<script src="js/demoController.js"></script>

Step 3: Add these in html

<html data-ng-app="myApp">

And

<body data-ng-controller="myCtrl">

Step 4: Write your own code in controller,

For example,

var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.CountryList = [

                          {
                              "code": "1", 
                              "Name" : "South Korea"

                          },
                          {
                              "code": "2", 
                              "Name" : "India"

                          },
                          {
                              "code": "3", 
                              "Name" : "Bangladesh"

                          },
                          {
                              "code": "4", 
                              "Name" : "Russia"

                          }

                          ];
});

Step 5: Write your own code in html,

For example,

<ul class="ui-listview">
    <li class="ui-li-static" data-ng-repeat="country in CountryList">
        {{country.Name}}
    </li>   
</ul>

View:

Also see this

http://stackoverflow.com/questions/40576285/tizen-web-app-angular-js-tutorial/40647377#40647377

 

-Thanks

Iqbal Hossain

Have you tried this ?