• This repository has been archived on 01/Oct/2023
  • Stars
    star
    242
  • Rank 167,048 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dynamically load scripts and css stylesheets in your Angular.JS app

angular-load

Dynamically load scripts and CSS stylesheets in your Angular.JS app.

Copyright (C) 2014, 2015, Uri Shaked [email protected]

Build Status Coverage Status

Installation

You can choose your preferred method of installation:

  • Through bower: bower install angular-load --save
  • Through npm: npm install angular-load --save
  • Download from github: angular-load.js

Usage

Include angular-load.js in your application.

<script src="bower_components/angular-load/dist/angular-load.min.js"></script>

Add the module angularLoad as a dependency to your app module:

var myapp = angular.module('myapp', ['angularLoad']);

You can also use ES6 or CommonJS

import angularLoad from 'angular-load';
// or
var angularLoad = require('angular-load');

var myapp = angular.module('myapp', [angularLoad]);

angularLoad service directive

The angularLoad service provides three methods: loadScript(), loadCSS() and unloadCSS().

Call the loadScript() and loadCSS() methods to load a script or a CSS stylesheet asynchronously into the current page. Both methods return a promise that will be resolved once the resource (script or stylesheet) has been loaded. In case of an error (e.g. HTTP 404) the promise will be rejected.

Call the unloadCSS() method to unload a CSS stylesheet from the current page. This method return boolean value, specifying whether the given stylesheet URL could be located in the page and has been unloaded. In case of trying to remove non-existent resource the function will return false

Usage example:

angularLoad.loadScript('https://mysite.com/someplugin.js').then(function() {
	// Script loaded succesfully.
	// We can now start using the functions from someplugin.js
}).catch(function() {
    // There was some error loading the script. Meh
});

Collaborators

Uri Shaked [email protected], Colm Seale [email protected]

License

Released under the terms of MIT License:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

angular-moment

Moment.JS directives for Angular.JS (timeago and more)
JavaScript
2,609
star
2

ngx-moment

moment.js pipes for Angular
TypeScript
1,174
star
3

angular-spinner

Angular directive to show an animated spinner (using spin.js)
TypeScript
697
star
4

firebase-server

Firebase Realtime Database Server Implementation
TypeScript
674
star
5

muse-js

Muse 2016 EEG Headset JavaScript Library (using Web Bluetooth)
TypeScript
276
star
6

angular-iot

Internet of Things directives for Angular 2 (Led, Button, etc.)
TypeScript
95
star
7

gulp-add-src

Add more 'src' files at any point in the pipeline (gulp plugin)
JavaScript
86
star
8

web-bluetooth-polyfill

Windows 10 Web Bluetooth Polyfill
JavaScript
76
star
9

web-ar-experiment

Experimenting with WebAR
HTML
68
star
10

arduino-slack-bot

A Real Time Slack Bot for Arduino (ESP8266)
Arduino
64
star
11

win-ble-cpp

Proof of Concept - BLE on Windows (for Web Bluetooth)
C++
63
star
12

pdfium-wasm

Building PDFium for Web Assembly
Dockerfile
61
star
13

ng2-simon

Simon Game for angular2-iot
Eagle
58
star
14

bigtsquery

Search Engine for TypeScript Code using AST Queries
TypeScript
50
star
15

web-lightbulb

Smart Light Bulb Web App (using Web Bluetooth)
JavaScript
49
star
16

muse-blink

Blink detection with Muse EEG Headset + Angular demo
TypeScript
43
star
17

angular-placeholder-shim

Angular directive to make the input/textarea placeholder attribute work on all browsers.
JavaScript
41
star
18

tsquery-playground

Playground for TSQuery
TypeScript
37
star
19

muse-lsl

Muse 2016 EEG Headset LSL (NodeJS)
JavaScript
32
star
20

purple-eye

A web-bluetooth controlled one-eyed robot
C++
26
star
21

ng-beacon

ng-beacon - Smart JavaScript Beacon shaped after the Angular logo
Eagle
24
star
22

angular2-material-build

Material Design for Angular2
JavaScript
22
star
23

cinto

Python
21
star
24

angular-static-site

Static Website with Angular - Build time rendering
TypeScript
20
star
25

beat-machine

Salsa Beat Machine 5 (Next.js + Web Audio)
TypeScript
20
star
26

node-lsl

LibLSL bindings for Node.js
JavaScript
20
star
27

ng-lift

Automated tooling for upgrading Angular.js app to Angular
TypeScript
17
star
28

vscode-tsquery

TSQuery extension for Visual Studio Code
TypeScript
17
star
29

awesome-web-bluetooth

Awesome list of Web Bluetooth Libraries, Demos and Resources
17
star
30

AndroidThingsCounter

Android Things app that uses a 7-Segment to display counter
Java
16
star
31

web-bluetooth-mock

Mock Implementation of Web Bluetooth (for tests)
TypeScript
15
star
32

aramcon-badge

Just a badge
Python
15
star
33

pdfium-wasm-example

Example of using PDFium Web Assembly build in Node.js
JavaScript
15
star
34

real-trex-runner

IRL version of Chrome Offline T-Rex game
JavaScript
13
star
35

heart-ariella

Heart-shaped flashlight PCB for Ariella
Eagle
12
star
36

java-openal

OpenAL JNA Wrappers for Java
Java
12
star
37

vr-hero-aframe

VR Hero: Invaders game with Angular + A-Frame
TypeScript
11
star
38

d3-angularjs-demo

Demo code for my talk: "Visualizing Data streams using Angular & D3.js"
JavaScript
11
star
39

TiMedia

AVFoundation wrappers for Titanium
Objective-C
11
star
40

angular-aframe-pipe

A-Frame pipe for interop with Angular
TypeScript
11
star
41

solidity-contracts

A collection of solidity contracts found on Github
JavaScript
11
star
42

webble-mip

MiP Robot Web Bluetooth App
HTML
10
star
43

circuitpython-mp3-ble

Streaming MP3 over BLE using CircuitPython and VS1053
Python
10
star
44

panda

Panda Logo PCB
Batchfile
9
star
45

angular-promises-toolkit

Extends the Angular.JS promise API with useful methods
JavaScript
9
star
46

aframe-fireball-component

Fireball component for A-Frame
JavaScript
8
star
47

love

Because branches also need some love!
8
star
48

gwt-titanium

A GWT module for Appcelerator's Titanium Platform
Java
8
star
49

t-rex-vr

VR Experiment T-Rex Game
JavaScript
8
star
50

ZlSound

Zero Latency Sound module for Titanium
Objective-C
8
star
51

nn-function-generator

Experimenting with automatic generation of TS function bodies using ANN models
TypeScript
8
star
52

ml-comments-gen

Generating source code comments with Machine Learning
TypeScript
8
star
53

tiny-simon

Simon Says game for ATTiny85
C++
8
star
54

aframe-camera-events

A-Frame helper to emit events when camera position / orientation changes
JavaScript
7
star
55

ng-beacon-app

Angular app to control ng-beacons
TypeScript
7
star
56

noble-winrt

WinRT bindings for Noble (using BLEServer.exe)
JavaScript
7
star
57

ctf-shittyaddon

Capture The Flag Shitty Addon
C++
7
star
58

typewiz-webpack-demo

Demo of using TypeWiz with WebPack
JavaScript
6
star
59

m3d-tools

Command line tools for interacting with the M3D Printer
C#
6
star
60

battery-bulb

Battery Powered Magic Blue bulb
5
star
61

angular-es6-promises

ECMAScript 6 promises for Angular.JS
JavaScript
5
star
62

spinduino-js

POV Fidget spinner running JavaScript
JavaScript
5
star
63

trumpet-nuggets

Web MIDI Snippets created by attendees during Chrome Dev Summit 2018
TypeScript
5
star
64

web-bluetooth-mamush

Live coding Web Bluetooth, a smart light bulb, Muse EEG headset and Chrome T-Rex game with React
JavaScript
5
star
65

web-bluetooth-secure-dfu

nRF5x Secure DFU over Web Bluetooth PoC
JavaScript
5
star
66

magicblue

Control Magic Blue Bulbs using Web Bluetooth
TypeScript
4
star
67

android-hello-arm

Hello world in Android ARM assembly
Batchfile
4
star
68

m3d-pro-gcodes

GCodes and Troubleshooting for the M3D Pro
4
star
69

hot-or-not

Hot or Not game for ng-beacons
TypeScript
4
star
70

valentines-vr

Small VR heart-collecting game for Valentines, live-coding during a IoT Makers meetup using A-Frame
HTML
4
star
71

vr-audio-visualizer

Audio Visualization Experiment with Angular + A-Frame
TypeScript
4
star
72

bluetooth-buzzer-button

Bluetooth Smart Buzzer Button, programmable with JavaScript
JavaScript
4
star
73

ng-beacon-firmware

ng-beacon firmware builds
4
star
74

elm-smart-bulb

Initial PoC of controlling a Smart Bluetooth Bulb from Elm code using Web Bluetooth
Elm
4
star
75

particle-mesh-broadcast

Sample code for broadcasting a message over the local mesh network using UDP
C++
3
star
76

web-midi-playground

Web MIDI Playground for Chrome Dev Summit demo
TypeScript
3
star
77

bitcoin-action-express

"Bitcoin Info" Assistant Action with TypeScript + Express
TypeScript
3
star
78

web-bluetooth-typings

Typings for Web Ble
TypeScript
3
star
79

firebase-localstorage-fix

Firebase 3.1.0 with support for disabled LocalStorage (e.g. private browsing in Safari)
JavaScript
3
star
80

espruino-mirror

Cast Espruino Pixl.js Display over BLE connection
TypeScript
3
star
81

doggie

A simple android watchdog application
Java
3
star
82

ng2-simon-highscore

App to display ng2-simon highscore on a TV
TypeScript
3
star
83

ac-generators

AngularConnect Generators + Protractor demo (TopCat)
JavaScript
3
star
84

t-rex-blinks

Chrome T-Rex Game controlled by eye blinks
JavaScript
3
star
85

iphonejava-hello-world

Hello world iPhone application written in Java!
Java
3
star
86

protractor-firebase

Utilities for interacting with Firebase within protractor tests
JavaScript
3
star
87

pi-thingy52-weather

Weather Station using Raspberry Pi, Thingy52 and HSDPA dongle
JavaScript
3
star
88

ng-beacon-firmware-old

JavaScript Firmware for ng-beacon (based on Espruino)
Shell
3
star
89

extract-java-classes

Extract all Java class definitions from the Github dataset
JavaScript
2
star
90

coronavirus-3d

Corona Virus 3D
HTML
2
star
91

floppy-disk-sao

Floppy Disk Shitty Addon
2
star
92

ng-pitfalls-demos

Code samples from my presenetation "Avoiding Common Pitfalls in AngularJS"
JavaScript
2
star
93

ng2-topcat

Angular 2 + Firebase Cat Rating System
TypeScript
2
star
94

muse-systemjs

Muse EEG Headset + SystemJS Minimal Setup
HTML
2
star
95

vr-talk-assets

Assets for WebVR talk
TypeScript
2
star
96

arduino-simon

Simon Game for Arduino
Arduino
2
star
97

solidity-downloader

Downloads a bunch of Solidity Contracts from GitHub Repos
JavaScript
2
star
98

serial-7segment-20mm

PCB + Firmware for 20mm Serial 7-Segment Display
Eagle
2
star
99

lightshow-poc

JavaScript
2
star
100

aramcon-broadcast

Broadcast MP3 Data over ESB (Enhanced ShockBurst) using nRF52840 + USB CDC
C
2
star