Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

Overriding $parse #18

@kokujin

Description

@kokujin

Can someone show me how to override the factories $parse or the instance in a controller? Thanks

 angular.module('app')
        .factory(Users', function(ActiveRecord) {
            return ActiveRecord.extend({
                // Rest API configuration for retrieving and saving tasks.
                $urlRoot: 'http://localhost:7171/api/1.0.0/users',
                $idAttribute: '_id',
                $parse: function(data, options) {
                    console.log('Parsing data....', data); <--- Does not work
                    //return data;
                }
            });
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions