| Provider | Singleton | Instantiable | Configurable |
|---|---|---|---|
| Constant | Yes | No | No |
| Value | Yes | No | No |
| Service | Yes | No | No |
| Factory | Yes | Yes | No |
| Decorator | Yes | No? | No |
| Provider | Yes | Yes | Yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * supplant() does variable substitution on the string. It scans through the string looking for | |
| * expressions enclosed in { } braces. If an expression is found, use it as a key on the object, | |
| * and if the key has a string value or number value, it is substituted for the bracket expression | |
| * and it repeats. | |
| * | |
| * Written by Douglas Crockford | |
| * http://www.crockford.com/ | |
| */ | |
| String.prototype.supplant = function (o) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var createPromiseSpy = function(obj, name, method, $q) { | |
| var createdSpy = jasmine.createSpy(name, obj); | |
| var returnObj = {}; | |
| var promise = {}; | |
| if (typeof(method) === 'string') { | |
| var deferred = $q.defer(); | |
| spyOn(createdSpy, method).and.returnValue(deferred.promise); | |
| promise[method] = deferred; | |
| } |
Apache appears to be listening on ::1 but not 127.0.0.1.
$ telnet localhost 80
Trying ::1...
Connected to localhost.
Escape character is '^]'.
$ telnet 127.0.0.1 80
Trying 127.0.0.1...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myApp = angular.module('myApp', []); | |
| myApp.directive('googleplace', function() { | |
| return { | |
| require: 'ngModel', | |
| link: function(scope, element, attrs, model) { | |
| var options = { | |
| types: [], | |
| componentRestrictions: {} | |
| }; |
NewerOlder