阅读背景:

如何更改AngularJS服务以使用Typescript?

来源:互联网 

I have this service:

我有这项服务:

app.factory('utilityService', [
    '$http',
    '$angularCacheFactory',
    utilityService
]);

function utilityService(
    $http,
    $angularCacheFactory
    ) {

    var factory = {};

    factory.rowClicked = function ($index, collection) {
        var row = collection[$index];
        if (row.current) {
            row.current = false;
            return null;
        } else {
            collection.forEach(function (object) {
                object.current = false;
            });
            row.current = true;
            return $index;
        }
    };

    factory.isArrayAndNotEmpty = function (theArray) {
        var rc = typeof theArray !== 'undefined' && theArray.length > 0;
        return rc;
    };


    return factory;

} 
app.factory('u



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: