خرید بک لینک

Vote count: 0

I'm trying to call another function within my factory but i get this error. i did what others said in this link. i could not find the problem. where did i go wrong? Thanks!

enter image description here

.factory('UserPreferences',function(Http,ngDialog,Notification){
        var settings = {}

  retu {
    authenticated: false,
    settings:{},        
    save_settings: function(data){
        var data = {
            url: '/pointofsale/userpreferences/save',
            data: data
        }

        Http.Post(data)

            .success(function(data){
                statusMessage = data
                ngDialog.closeAll(0)
            })
    },
    authenticate_change_settings: function(user,settings){
        this.settings = settings

        var data = {
            url: '/pointofsale/authenticate_change_settings',
            data: user
        }

        Http.Post(data)
            .success(function(data){

                if(data){
                    this.authenticated = true;
                    this.save_settings(this.settings);

                }
            }).error(function(data){    
                Notification.error(data)
            })

    }       
}

asked 58 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 12 مرداد 1395 ساعت: 9:45

صفحه بندی