locked
$linq in Angular JS RRS feed

  • Question

  • User-864681547 posted

    Hello All,

    I used $linq in my Demo.js File and filter data as given below.

    $scope.ProductList = $linq.Enumerable().From($scope.OrderList)
                            .Where(function (x) {
                                return x.Id == obj
                            })
                            .Select(function (x) {
                                return x
                            })
                            .ToArray();

    But i got error that :

    Error: $linq is not defined $scope.EditOrder@http://localhost:49647/Demo.js:186:13 anonymous/fn@http://localhost:49647/scripts/angular.js line 14605 > Function:2:373 expensiveCheckFn@http://localhost:49647/scripts/angular.js:15694:18 ngEventHandler/</callback@http://localhost:49647/scripts/angular.js:25622:17 $RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost:49647/scripts/angular.js:17444:16 $RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:49647/scripts/angular.js:17544:20 ngEventHandler/<@http://localhost:49647/scripts/angular.js:25627:17 st.event.dispatch@http://localhost:49647/scripts/jquery-1.9.0.min.js:2:5365 st.event.add/y.handle@http://localhost:49647/scripts/jquery-1.9.0.min.js:2:2108

    So how i can resolve below error?

    Please give me  steps to use linq in AngularJS

    Friday, July 8, 2016 7:09 AM

Answers

  • User1992938117 posted
    Which linq library you used?
    Check this: https://github.com/Angular-Public/angular-linq

    Also make sure you have injected linq in rootscope.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 8, 2016 5:56 PM

All replies

  • User1992938117 posted
    Which linq library you used?
    Check this: https://github.com/Angular-Public/angular-linq

    Also make sure you have injected linq in rootscope.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 8, 2016 5:56 PM
  • User-864681547 posted

    Thanks Rajneesh.

    I used same just there is syntax issue. Resolved.

    Wednesday, July 13, 2016 8:55 AM