Code Monkey home page Code Monkey logo

Comments (9)

pc035860 avatar pc035860 commented on August 18, 2024

Hi @vnctaing

It doesn't seem possible to me for ezfb.getLoginStatus to be unavailable. Since it should be published when ezfb is established as a service.

Can you dump $log.debug(ezfb) output in the MainCtrl here?

from angular-easyfb.

vin-san avatar vin-san commented on August 18, 2024

When I try to use

.controller('MainCtrl', ['$scope', 'Upload', function($scope, ezfb, Upload, $log) {
$log.debug(ezfb);

I got :
Error: $log is undefined

I used console.log(ezfb); instead. Is it ok ?

Object { upload: this.upload(), http: this.http(), setDefaults: this.setDefaults(), defaults: Object, version: "7.0.15", dataUrl: d.dataUrl(), registerValidators: f.registerValidators(), validatePattern: f.validatePattern(), validate: f.validate(), imageDimensions: f.imageDimensions(), 4 de plus… }

Can't display 4 more…

from angular-easyfb.

pc035860 avatar pc035860 commented on August 18, 2024

Ah.. I see. You are using inline annotation in MainCtrl, but you forgot to add the annotations for ezfb and $log. And that's why $log is also reported undefined.

Modify your MainCtrl code to

.controller('MainCtrl', ['$scope', 'ezfb', 'Upload', function($scope, ezfb, Upload) {

should work.

I suggest using ng-annotate for automatic annotating.

from angular-easyfb.

vin-san avatar vin-san commented on August 18, 2024

I tried it before but I got this error :
Error: [$injector:unpr] Unknown provider: ezfbProvider <- ezfb <- MainCtrl

(I don't use minifier but I'll definitly use ng-annotate)

My other modules work fine so I assume that the problem come from ezfb… I just don't get it.

from angular-easyfb.

vnctaing avatar vnctaing commented on August 18, 2024

Have you loaded <script src="bower_components/angular-easyfb/angular-easyfb.js"></script> in your index.html ?

from angular-easyfb.

vin-san avatar vin-san commented on August 18, 2024

Yes, the js file is loaded in index.html.
Can this problem be linked to ng-Route ?

from angular-easyfb.

vnctaing avatar vnctaing commented on August 18, 2024

Try to inject correctly ezfbProvider in .config(['$routeProvider','$locationProvider', 'ezfbProvider', function($routeProvider, $locationProvider, ezfbProvider) ?

from angular-easyfb.

vin-san avatar vin-san commented on August 18, 2024

I found it. ezfbProvider.setInitParams was declared ouside the config function…
Sorry for that and many thanks for all your help & advices.

from angular-easyfb.

pc035860 avatar pc035860 commented on August 18, 2024

@vin-san no problem! Thank you @vnctaing !

from angular-easyfb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.