Skip to content

nglHref is an angular directive to use $location inside a template.

License

Notifications You must be signed in to change notification settings

Pulpmedia/ngl-href

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nglHref is a directive to use $location inside a template. this way, it doesn't matter, if you're using the html5Mode or not.

Installing nglHref

1.1 Bower

bower install nglHref

2. Download

Download the Package from https://github.com/Pulpmedia/ngl-href/archive/master.zip

Using nglHref

  • Include the libraries
<script src="https://code.angularjs.org/1.3.4/angular.js"></script>
<script src="nglHref/dist/ngl-href.min.js"></script>
  • Inject the Module into your application
angular.module('myApp', ['nglHref']);
  • Use the directive in your html
<a ngl-href="/home"></a>

results in

<a href="/home"></a>

clicking the link will trigger $location.path() instead, wich makes it independent from the environment.

About

nglHref is an angular directive to use $location inside a template.

Resources

License

Stars

Watchers

Forks

Packages

No packages published