| 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 |
| <div class="form-group"> | |
| <label for="state" class="col-sm-2 control-label">State</label> | |
| <div class="col-sm-10"> | |
| <select class="form-control" id="state" name="state"> | |
| <option value="">N/A</option> | |
| <option value="AK">Alaska</option> | |
| <option value="AL">Alabama</option> | |
| <option value="AR">Arkansas</option> | |
| <option value="AZ">Arizona</option> | |
| <option value="CA">California</option> |
| console.clear(); | |
| var dest = { | |
| foo : { | |
| b1 : "b1 value", | |
| b2 : "b2 value" | |
| }, | |
| baz : { | |
| q1 : "q1 value" | |
| }, |
| /* | |
| # Usage in html template: | |
| "xxx | HTML2TXT" | |
| <div ng-bind-html=" YourString | HTML2TXT "></div> | |
| ======= |
The purpose of this style guide is to suggest formatting conventions for AngularJS modules that result in readible, maintainable, and lint free code (see the linter configurations for JSHint and gjslint.py.
Typically, an AngularJS application would be structured with many modules in separate files. The example below shows a monolithic module to illustrate the formatting conventions for various module methods.
angular.module('module.name', [| angular.module('myApp.services', []) | |
| .factory('UserFactory', function($http, $q) { | |
| var service = { | |
| // our factory definition | |
| user: {}, | |
| setName: function(newName) { | |
| service.user['name'] = newName; | |
| }, | |
| setEmail: function(newEmail) { | |
| service.user['email'] = newEmail; |
#Example syntax for Secure Copy (scp)
##What is Secure Copy?
scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.
###Examples
Copy the file "foobar.txt" from a remote host to the local host
| angular.module('restangularDemoApp', [ | |
| 'restangular', | |
| 'ngCookies' | |
| ]) | |
| .constant('apiKey', 'YOUR_Mongolab_API_KEY') | |
| .config(function(RestangularProvider, apiKey) { | |
| RestangularProvider.setBaseUrl('https://api.mongolab.com/api/1/databases/YOURDATABASE/collections'); | |
| RestangularProvider.setDefaultRequestParams({ | |
| apiKey: apiKey | |
| }) |
| 'use strict'; | |
| var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
| var mountFolder = function (connect, dir) { | |
| return connect.static(require('path').resolve(dir)); | |
| }; | |
| module.exports = function (grunt) { | |
| // load all grunt tasks | |
| require('matchdep'). | |
| filterDev('grunt-*'). |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Brandon B. brandon@brandonbrown.io
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE