Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not seem to work at all anymore #19

Closed
stcalica opened this issue Jul 15, 2016 · 3 comments
Closed

Does not seem to work at all anymore #19

stcalica opened this issue Jul 15, 2016 · 3 comments

Comments

@stcalica
Copy link

I tried using this and it doesn't seem to recognize $disqusProvider at all

Here is what I did:

  1. bower install angular-disqus --save

  2. added ngDisqus

  3. tried to register the shortname.

(function(){

        'use strict';

        var dependencies = [
                'ghpg',
                'ngRoute',
                'ngDisqus'
        ];

        angular.module('blogger', dependencies)
        .config(Config);

        Config.$inject = ['$locationProvider', '$disqusProvider'];

        function Config($locationProvider){

                $locationProvider.hashPrefix('!');
                $locationProvider.html5Mode('true');
                $disqusProvider.setShortname('codeisdead');
        }

        if (window.location.hash === '#_=_'){
                window.location.hash = '#!';

        }


        //bootstrap angular

        angular.element(document).ready(function(){

                angular.bootstrap(document, ['blogger']);

        });



})();

Here is the error:

Failed to instantiate module blogger due to:
ReferenceError: $disqusProvider is not defined
    at Config (http://127.0.0.1:8080/angular/app.js:19:3)
    at Object.invoke (http://127.0.0.1:8080/js/lib/angular/angular.min.js:41:372)
    at d (http://127.0.0.1:8080/js/lib/angular/angular.min.js:39:321)
    at http://127.0.0.1:8080/js/lib/angular/angular.min.js:39:445
    at q (http://127.0.0.1:8080/js/lib/angular/angular.min.js:7:355)
    at g (http://127.0.0.1:8080/js/lib/angular/angular.min.js:39:222)
    at bb (http://127.0.0.1:8080/js/lib/angular/angular.min.js:43:246)
    at c (http://127.0.0.1:8080/js/lib/angular/angular.min.js:21:19)
    at Object.yc [as bootstrap] (http://127.0.0.1:8080/js/lib/angular/angular.min.js:21:332)
    at HTMLDocument.<anonymous> (http://127.0.0.1:8080/angular/app.js:32:11


@ghost
Copy link

ghost commented Aug 21, 2016

That error usually isn't due to the code being dead. It's likely a misplaced ";" somewhere.

@ghost
Copy link

ghost commented Aug 23, 2016

Installed it – works like a champ. Except that I'm still getting the same problem that I was getting with my previous install methods – for the life of me, I can't get my threads on my mobile app synced to those on my website. But I've had that problem with three methods, now, so I'm pretty sure the issue is on my end :)

Did you include the angular-disqus.jsscript in your index.html (or equivalent) file?

@stcalica
Copy link
Author

Yeah so I actually just a complete reinstall of the services and now it works. I probably messed something up the first time. I'll close this down. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant