Giter Club home page Giter Club logo

Comments (10)

Remco75 avatar Remco75 commented on August 15, 2024 4

Any plans on this one? Can I help out?

from ngmeta.

taasver avatar taasver commented on August 15, 2024 2

I didn't want to re-enable state change events, so I did this HACKY solution that works on my case:

// file: app.run
$transitions.onFinish({}, function(trans) {
  $rootScope.$broadcast('$routeChangeSuccess', trans.to());
});

I used ngRoute event because I'm not using ngRoute anyway.. but it might cause issues on some cases.

from ngmeta.

mackelito avatar mackelito commented on August 15, 2024

Damn.. I´m just about to get started on adding this module to our app.. to bad it doesn't´t work whit 1.0

I guess that this should be easy to update and just use the $transitions.onSuccess instead.

from ngmeta.

mackelito avatar mackelito commented on August 15, 2024

From the ui-router repo.

The $stateChange* events are deprecated in 1.0. They are replaced with the $transitions.on* transition hooks.

However, they can be re-enabled for backwards compatibility by including stateEvents.js and depending on the 'ui.router.state.events' angular module.

<script src="stateEvents.js">
var myApp = angular.module('myApp', ['ui.router', 'ui.router.state.events']);

Note: the code in stateEvents.js re-implements the $stateChange* events using the new Transition Hooks

from ngmeta.

p1lare avatar p1lare commented on August 15, 2024

Thanks @taasver !
The HACK, worked for me as well. Waiting for next version of ngMeta, with the real fix.
Now I hope google will index all my custom meta tags :)
I have some issues or feature request, but I will open them in different topic.

from ngmeta.

sojoonsup avatar sojoonsup commented on August 15, 2024

Any plans???

from ngmeta.

rodrigoyoshida avatar rodrigoyoshida commented on August 15, 2024

@taasver where can I find the app.run file to add that code?

from ngmeta.

taasver avatar taasver commented on August 15, 2024

Sorry, there might not be a file called app.run on your case.
But it needs to be in run block.
Maybe this will be help: https://stackoverflow.com/questions/20663076/angularjs-app-run-documentation

from ngmeta.

rodrigoyoshida avatar rodrigoyoshida commented on August 15, 2024

@taasver thanks! It worked perfectly. Hope they fix the module so we do not have to use this hack.

from ngmeta.

vinaygopinath avatar vinaygopinath commented on August 15, 2024

Should be fixed in v1.0.2. Please reopen if you still see this issue.

from ngmeta.

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.