Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Kendo and AngularJS integration not working

$
0
0
(function () {
    'use strict';
    angular
        .module('prestart.services', []);
}());
 
(function () {
    'use strict';
    angular.module('prestart', [
        'prestart.core',
        'prestart.services',
        'prestart.home'
 
    ]);
}());
 
(function () {
    'use strict';
    angular
        .module('prestart')
        .config(function ($stateProvider, $urlRouterProvider, $compileProvider) {
 
            $compileProvider.debugInfoEnabled(false);
            $urlRouterProvider.otherwise('/');
 
            $stateProvider
                .state('home', {
                    url: '/home',
                    cache: false,
                    controller: 'PrestartCtrl as prestart',
                    templateUrl: 'www/src/home/prestart.html'
                })
 
 
        });
}());
 
(function () {
  'use strict';
  angular
    .module('prestart')
    .run(function($rootScope, $state){
        $state.go('home');
    });
}());
 
(function () {
    'use strict';
    angular
        .module('prestart.home')
        .controller('PrestartCtrl', PrestartCtrl);
 
    PrestartCtrl.$inject = ['$scope', 'dataLoaderService'];
 
    function PrestartCtrl($scope, $dataLoaderService) {
        var vm = this;
        vm.title = "Test title"
        vm.equipments = $dataLoaderService.loadPrestartData();
        return vm
    }
}());
 
(function () {
    'use strict';
    angular
        .module('prestart.services')
        .factory('dataLoaderService', dataLoaderService);
 
 
    function dataLoaderService() {
 
        return {
            loadPrestartData: loadPrestartData
        };
 
        // Implementation -----
 
        function loadPrestartData() {
            return [
                {
                    Description: 'Blah',
                    Category: 'Blah'    
                },
                {
                    Description: 'Blah 1',
                    Category: 'Blah 1'
                }
            ];
        }
    }
}());

 

Index.html

<bodyng-app="prestart">
 <divui-view></div>
</body>​

prestart.html

<kendo-mobile-list-viewclass="item-list"k-data-source="prestart.equipments">
   <divk-template>
       {{dataItem.Description}}
   </div>
</kendo-mobile-list-view>

The out is printed as [Object Object]. If I build kendo datasource for vm.equipments output is blank :(

 Any help appreciated.


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>