Code Monkey home page Code Monkey logo

angularjs-viewhead's People

Contributors

apparentlymart avatar imbolc avatar nonplus avatar smarts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angularjs-viewhead's Issues

minified

please provide a minified version

Problem when used with ui-router's ui-sref

When using ui-sref for navigating to another ui-view, the $rootScope.viewTitle
is deleted before it can be set by the view-title in the destination view.

This causes a flicker in the window title (in Chrome) and, worse, the incorrect title shows
up in the browser history.

http://plnkr.co/edit/3KFIrSyqreBdYxTHQd2M?p=info

I fixed this by delaying the delete $rootScope.viewTitle until the next digest cycle and only delete the viewTitle if it hasn't be re-assigned by some other <view-title> directive.

http://plnkr.co/edit/2T2PmV

Can I use this to dynamically set og metatags without a pre-render server?

Hello,

I apologize for creating an issue for this, but I couldn't figure out another way to contact you. I see in the example a dynamic og metatag, but I don't understand how this could be. Facebook interprets these tags without executing javascript, so how would Facebook be able to interpret this? My goal is to have dynamic metatags on Facebook / Twitter / Google without having to create a pre-render server and all that headache.

Thanks very much,
-Keith Chima

remove listener on destroy

Every main view of my application has a view-title, but some have to wait for an AJAX call to come back

For example
"UserX - myApp"
when I go to UserY, the view title vanishes, so the default html title will be displayed which is the URL.
Then when the user is loaded, the ng-if will be rendered and just then the title shows "UserY - myApp"

Removing delete $rootScope.viewTitle fixed it for me

Using <title view-head> rather than <view-head>

Can we document using: <title view-head></title> from a template in addition to the documentation for <view-head></view-head>?

It seems <view-head> only works when the ng-app directive is on the <html> element which is incompatible with preboot (ng-app needs to be on a <div> within <body>)

Can I make a pull request?

I've made some changes to your repo to:

  1. make it more efficient readable (enforcing best practices, as shown here: https://github.com/johnpapa/angular-styleguide),
  2. allow it to be minified without being broken and
  3. added a minified version (someone asked for one in another issue).

If I could push my branch for a review that'd be great. Everything works exactly the same but allows for more flexibility now. Just waiting on your permission to push my new branch (pulled from master).

Dynamic content from scope not loading for meta tags

I am trying to load dynamic content into the meta tags for facebook share button. The state loads with the tags transported to the head, but the dynamic content is blank. My tags look similar to the below.

<meta view-head property="og:url"             content="{{share.url}}" /> 
<meta view-head property="og:title"           content="{{share.title}}" /> 
<meta view-head property="og:image"           content="{{share.image}}" /> 
<meta view-head property="og:description"     content="{{share.desc}}" />
<meta view-head property="og:image:height"    content="{{share.imgh}}" />
<meta view-head property="og:image:width"     content="{{share.imgw}}" />

Title is not retained in browser history when used with ui-router

I am using angular-ui/ui-router (https://github.com/angular-ui/ui-router). The 'destroy' action of the directive occurs prior to ui-router registering the name in the history stack. Therefore, you cannot see the titles in this browser history. I have solved the issue in my project via a workaround. However, the workaround it is not as clean or modular as I would prefer, so I am not going to submit a pull request with it. I did, however, think I should report the issue, in case you can come up with a clean way of handling the issue.

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.