https://github.com/500tech/spectangular
Press shift-click on every element on the screen to view it's angular context
https://github.com/500tech/spectangular
Last synced: 5 months ago
JSON representation
Press shift-click on every element on the screen to view it's angular context
- Host: GitHub
- URL: https://github.com/500tech/spectangular
- Owner: 500tech
- License: mit
- Created: 2014-12-08T07:19:30.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-19T20:22:28.000Z (over 11 years ago)
- Last Synced: 2025-04-30T10:33:29.590Z (about 1 year ago)
- Language: JavaScript
- Size: 2.49 MB
- Stars: 0
- Watchers: 19
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
spectangular
============
Press shift-click on every element on the screen to view it's angular context
[Live Demo](https://spectangulardemo.herokuapp.com "Spectangular Live Demo")
Installation:
------------
```
bower install spectangular
```
Add reference to dist/spectangular.js after angular.js in your main html file:
```html
```
Add 500tech.spectangular module as a dependency
```javascript
angular.module('myApp', ['500tech.spectangular', ...]);
```
And there you go!!
By default, spectangular only works if the page is localhost, 127.0.0.1 or lvh.me
Further configuration:
---------------------
If you want to enable it on domains other than localhost, configure it so:
```javascript
angular.module('myApp',[]).config(function(spectangular) {
spectangular.domain('another.domain.com');
spectangular.domain('10.0.0.4');
});
```
If you want to enable it based on other criteria, simply call the enable / disable functions:
```javascript
angular.module('myApp',[]).config(function(spectangular) {
spectangular.enable();
spectangular.disable();
});
```
Note:
-------------
> To be extra descriptive, spectangular decorates the '$controller' service and injects a 'controllerName' attribute to your scopes.
This only happens when spectangular is enabled.