ng-meta
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "ngMeta", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"authors": [ | ||
@@ -5,0 +5,0 @@ "Vinay Gopinath <vinayg18@gmail.com>" |
#Changelog | ||
## [v1.0.1](https://github.com/vinaygopinath/ngMeta/releases/tag/v1.0.0) | ||
##### Features | ||
* [#27](https://github.com/vinaygopinath/ngMeta/issues/27) Added support for Webpack. Thanks [@mcgilly17](https://github.com/mcgilly17) | ||
## [v1.0.0](https://github.com/vinaygopinath/ngMeta/releases/tag/v1.0.0) | ||
@@ -4,0 +10,0 @@ |
@@ -22,3 +22,3 @@ (function(root, factory) { | ||
*/ | ||
angular.module('ngMeta', []) | ||
return angular.module('ngMeta', []) | ||
.provider('ngMeta', function() { | ||
@@ -25,0 +25,0 @@ |
@@ -1,4 +0,4 @@ | ||
/* ngMeta - v1.0.0 - 15-Oct-2016 | ||
/* ngMeta - v1.0.1 - 24-Aug-2017 | ||
https://github.com/vinaygopinath/ngMeta | ||
*/ | ||
!function(a,b){"function"==typeof define&&define.amd?define(["angular"],b):"object"==typeof exports?module.exports=b(require("angular")):a.returnExports=b(a.angular)}(this,function(a){a.module("ngMeta",[]).provider("ngMeta",function(){"use strict";function b(b){var e=function(e,f){if(!b.ngMeta)throw new Error("Cannot call setTitle when ngMeta is undefined. Did you forget to call ngMeta.init() in the run block? \nRefer: https://github.com/vinaygopinath/ngMeta#getting-started");return b.ngMeta.title=a.isDefined(e)?e:c.title||"",d.useTitleSuffix&&(b.ngMeta.title+=a.isDefined(f)?f:c.titleSuffix||""),this},f=function(d,e){if(!b.ngMeta)throw new Error("Cannot call setTag when ngMeta is undefined. Did you forget to call ngMeta.init() in the run block? \nRefer: https://github.com/vinaygopinath/ngMeta#getting-started");if("title"===d||"titleSuffix"===d)throw new Error("Attempt to set '"+d+"' through 'setTag': 'title' and 'titleSuffix' are reserved tag names. Please use 'ngMeta.setTitle' instead");return b.ngMeta[d]=a.isDefined(e)?e:c[d],this},g=function(a,d){if(!b.ngMeta)throw new Error("Cannot call setDefaultTag when ngMeta is undefined. Did you forget to call ngMeta.init() in the run block? \nRefer: https://github.com/vinaygopinath/ngMeta#getting-started");return c[a]=d,"title"===a||"titleSuffix"===a?this.setTitle(b.ngMeta.title,b.ngMeta.titleSuffix):this.setTag(a,b.ngMeta[a]),this},h=function(b){if(b=b||{},b.disableUpdate)return!1;e(b.title,b.titleSuffix);var d=a.copy(c);delete b.title,delete b.titleSuffix,delete d.title,delete d.titleSuffix;for(var g=Object.keys(b),h=0;h<g.length;h++)d.hasOwnProperty(g[h])&&delete d[g[h]],f(g[h],b[g[h]]);for(var i=Object.keys(d),j=0;j<i.length;j++)f(i[j],d[i[j]])},i=function(b,c){h(a.copy(c.meta||c.data&&c.data.meta))},j=function(){b.ngMeta={},b.$on("$routeChangeSuccess",i),b.$on("$stateChangeSuccess",i)};return{init:j,setTitle:e,setTag:f,setDefaultTag:g}}var c={},d={useTitleSuffix:!1};this.setDefaultTitle=function(a){return c.title=a,this},this.setDefaultTitleSuffix=function(a){return c.titleSuffix=a,this},this.setDefaultTag=function(a,b){return c[a]=b,this},this.useTitleSuffix=function(a){return d.useTitleSuffix=!!a,this},this.mergeNestedStateData=function(b,c){var d=c(b)||{},e=b.parent&&b.parent.data&&b.parent.data.meta;if(d.meta||e){var f=a.merge({},e,d.meta);d.meta=f}return b.self.data=d,d},this.$get=["$rootScope",function(a){return new b(a)}]})}); | ||
!function(a,b){"function"==typeof define&&define.amd?define(["angular"],b):"object"==typeof exports?module.exports=b(require("angular")):a.returnExports=b(a.angular)}(this,function(a){return a.module("ngMeta",[]).provider("ngMeta",function(){"use strict";function b(b){var e=function(e,f){if(!b.ngMeta)throw new Error("Cannot call setTitle when ngMeta is undefined. Did you forget to call ngMeta.init() in the run block? \nRefer: https://github.com/vinaygopinath/ngMeta#getting-started");return b.ngMeta.title=a.isDefined(e)?e:c.title||"",d.useTitleSuffix&&(b.ngMeta.title+=a.isDefined(f)?f:c.titleSuffix||""),this},f=function(d,e){if(!b.ngMeta)throw new Error("Cannot call setTag when ngMeta is undefined. Did you forget to call ngMeta.init() in the run block? \nRefer: https://github.com/vinaygopinath/ngMeta#getting-started");if("title"===d||"titleSuffix"===d)throw new Error("Attempt to set '"+d+"' through 'setTag': 'title' and 'titleSuffix' are reserved tag names. Please use 'ngMeta.setTitle' instead");return b.ngMeta[d]=a.isDefined(e)?e:c[d],this},g=function(a,d){if(!b.ngMeta)throw new Error("Cannot call setDefaultTag when ngMeta is undefined. Did you forget to call ngMeta.init() in the run block? \nRefer: https://github.com/vinaygopinath/ngMeta#getting-started");return c[a]=d,"title"===a||"titleSuffix"===a?this.setTitle(b.ngMeta.title,b.ngMeta.titleSuffix):this.setTag(a,b.ngMeta[a]),this},h=function(b){if(b=b||{},b.disableUpdate)return!1;e(b.title,b.titleSuffix);var d=a.copy(c);delete b.title,delete b.titleSuffix,delete d.title,delete d.titleSuffix;for(var g=Object.keys(b),h=0;h<g.length;h++)d.hasOwnProperty(g[h])&&delete d[g[h]],f(g[h],b[g[h]]);for(var i=Object.keys(d),j=0;j<i.length;j++)f(i[j],d[i[j]])},i=function(b,c){h(a.copy(c.meta||c.data&&c.data.meta))};return{init:function(){b.ngMeta={},b.$on("$routeChangeSuccess",i),b.$on("$stateChangeSuccess",i)},setTitle:e,setTag:f,setDefaultTag:g}}var c={},d={useTitleSuffix:!1};this.setDefaultTitle=function(a){return c.title=a,this},this.setDefaultTitleSuffix=function(a){return c.titleSuffix=a,this},this.setDefaultTag=function(a,b){return c[a]=b,this},this.useTitleSuffix=function(a){return d.useTitleSuffix=!!a,this},this.mergeNestedStateData=function(b,c){var d=c(b)||{},e=b.parent&&b.parent.data&&b.parent.data.meta;if(d.meta||e){var f=a.merge({},e,d.meta);d.meta=f}return b.self.data=d,d},this.$get=["$rootScope",function(a){return new b(a)}]})}); |
{ | ||
"name": "ng-meta", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Meta tags support for AngularJS single page applications (SPA)", | ||
@@ -5,0 +5,0 @@ "main": "dist/ngMeta.js", |
# ngMeta | ||
> Dynamic meta tags in your AngularJS single page application | ||
[![npm version](https://badge.fury.io/js/ng-meta.svg)](https://badge.fury.io/js/ng-meta) [![Build Status](https://travis-ci.org/vinaygopinath/ngMeta.svg?branch=master)](https://travis-ci.org/vinaygopinath/ngMeta) | ||
[![npm version](https://badge.fury.io/js/ng-meta.svg)](https://badge.fury.io/js/ng-meta) [![Build Status](https://travis-ci.org/vinaygopinath/ngMeta.svg?branch=master)](https://travis-ci.org/vinaygopinath/ngMeta) [![Join the chat at https://gitter.im/ngMeta/Lobby](https://badges.gitter.im/ngMeta/Lobby.svg)](https://gitter.im/ngMeta/Lobby) | ||
@@ -104,4 +104,3 @@ This is an Angular 1.x module. Angular2 module is available as [ng2-meta](https://github.com/vinaygopinath/ng2-meta) | ||
```html | ||
<title ng-bind="ngMeta.title"></title> | ||
<!-- OR <title>{{ngMeta.title}}</title> --> | ||
<title ng-bind="ngMeta.title"></title> | ||
@@ -108,0 +107,0 @@ <!-- Arbitrary tags --> |
@@ -22,3 +22,3 @@ (function(root, factory) { | ||
*/ | ||
angular.module('ngMeta', []) | ||
return angular.module('ngMeta', []) | ||
.provider('ngMeta', function() { | ||
@@ -25,0 +25,0 @@ |
52196
13
268