https://github.com/ddjain/ng-load
https://github.com/ddjain/ng-load
angular angularjs customdirectives customdiretciveexample directive javascript onload
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ddjain/ng-load
- Owner: ddjain
- License: mit
- Created: 2019-03-23T09:01:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T03:15:14.000Z (almost 5 years ago)
- Last Synced: 2025-04-12T04:46:51.810Z (about 2 months ago)
- Topics: angular, angularjs, customdirectives, customdiretciveexample, directive, javascript, onload
- Language: JavaScript
- Size: 46.9 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ng-load
ng-load is implementation of javascript's on-load event in angular js.## About
You may wish to use callback function on DOM is loaded same like onload event in javascript. ng-load will provide custom callback once DOM is loaded. Implementation of OnLoad event of javascript in Angular JS. Internally ng-load calls onload event so this directive can work with almost every DOM element like div, a, iframe, body, image etc.## Requirements
* Angular js.## Getting Started
Files to Download
install them from npm by entering the command ```npm i angular-ng-load```.Include `angular-load.min.js` after `angular.js`.
example:
JS
```
// include the `ngLoad` module
var app = angular.module('myApp', ['ngLoad']);
app.controller('myCtrl', function($scope) {
$scope.testCallbackFunction = function() {
//TODO : Things to do once Element is loaded
};});
```HTML
```
```
## Contributing
Contributors are welcome. I am interested in suggestions for new features or improvements. Please get in touch.