https://github.com/adambullmer/angular-shim
ES6 compiled AMD wrapper for Angular.js
https://github.com/adambullmer/angular-shim
Last synced: 2 months ago
JSON representation
ES6 compiled AMD wrapper for Angular.js
- Host: GitHub
- URL: https://github.com/adambullmer/angular-shim
- Owner: adambullmer
- License: mit
- Created: 2016-03-25T16:51:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-27T17:34:12.000Z (about 9 years ago)
- Last Synced: 2025-03-03T21:04:59.613Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular Shim
ES6 compiled AMD wrapper for [Angular.js](https://angularjs.org/)## How to use
1. Include your desired module script after the inclusion of `angular.js`
1. Import `angular` as a module in your script
1. Enjoy your importable use of angular### Loaders
Extra libraries may be required for your project|Module Type|Loader Name|Tested|
|-----------|-----------|------|
|amd|[loader.js](https://github.com/ember-cli/loader.js)|Passed|### Examples
#### ES6
```js
import angular from 'angular'angular.module('thing', []);
```#### AMD
This may be an unnecessary library if you are using `requirejs`. Instead you can let it create the shim for you, optimized for your amd loader. More about that [here](http://requirejs.org/docs/api.html#config-shim).```js
requirejs.config(
paths: {
// ...
},
shim: {
'angular': {
exports: 'angular'
}
}
)
``````js
define('thing', ['angular'], function (angular) {
angular.module('thing', []);
});
```## Testing
Testing is limited to a quick `src` and `dist` check for linting: `npm test`