Last active
August 29, 2015 14:04
-
-
Save amerkay/57214471ba1cf97f1947 to your computer and use it in GitHub Desktop.
AngularJS Snippets Code Completion $ fix
This file contains 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
Show hidden characters
// Source project https://github.com/maxhoffmann/angular-snippets/ | |
// With ST3, it removes $. This fixes that by double escaping $ with \\$ | |
{ | |
"scope": "source.js", | |
"completions": | |
[ | |
// ========== ng ========== | |
// function | |
{ "trigger": "angular.bind", "contents": "angular.bind(${1:self}, ${2:function})" }, | |
{ "trigger": "angular.bootstrap", "contents": "angular.bootstrap(${1:element}${2:, [${3:modules}]})" }, | |
{ "trigger": "angular.copy", "contents": "angular.copy(${1:source}${2:, ${3:destination}})" }, | |
{ "trigger": "angular.element", "contents": "angular.element(${1:element})" }, | |
{ "trigger": "angular.equals", "contents": "angular.equals(${1:obj1}, ${2:obj2})" }, | |
{ "trigger": "angular.extend", "contents": "angular.extend(${1:destination}, ${2:source})" }, | |
{ "trigger": "angular.forEach", "contents": "angular.forEach(${1:obj}, ${2:iterator}$3)" }, | |
{ "trigger": "angular.fromJson", "contents": "angular.fromJson(${1:jsonString})" }, | |
{ "trigger": "angular.identity", "contents": "angular.identity()" }, | |
{ "trigger": "angular.injector", "contents": "angular.injector([${1:modules}])" }, | |
{ "trigger": "angular.isArray", "contents": "angular.isArray(${1:value})" }, | |
{ "trigger": "angular.isDate", "contents": "angular.isDate(${1:value})" }, | |
{ "trigger": "angular.isDefined", "contents": "angular.isDefined(${1:value})" }, | |
{ "trigger": "angular.isElement", "contents": "angular.isElement(${1:value})" }, | |
{ "trigger": "angular.isFunction", "contents": "angular.isFunction(${1:value})" }, | |
{ "trigger": "angular.isObject", "contents": "angular.isObject(${1:value})" }, | |
{ "trigger": "angular.isString", "contents": "angular.isString(${1:value})" }, | |
{ "trigger": "angular.isUndefined", "contents": "angular.isUndefined(${1:value})" }, | |
{ "trigger": "angular.lowercase", "contents": "angular.lowercase(${1:string})" }, | |
{ "trigger": "angular.module", "contents": "angular.module('${1:moduleName}', [$2])" }, | |
{ "trigger": "angular.noop", "contents": "angular.noop" }, | |
{ "trigger": "angular.toJson", "contents": "angular.toJson(${1:obj}${2:, true})" }, | |
{ "trigger": "angular.uppercase", "contents": "angular.uppercase(${1:string})" }, | |
// object | |
{ "trigger": "angular.version", "contents": "angular.version" }, | |
// service | |
{ "trigger": "angular: $anchorScroll", "contents": "\\$anchorScroll" }, | |
// { "trigger": "angular: $animate", "contents": "\\$animate" }, | |
{ "trigger": "angular: $cacheFactory", "contents": "\\$cacheFactory" }, | |
{ "trigger": "angular: $compile", "contents": "\\$compile" }, | |
{ "trigger": "angular: $controller", "contents": "\\$controller" }, | |
{ "trigger": "angular: $document", "contents": "\\$document" }, | |
{ "trigger": "angular: $exceptionHandler", "contents": "\\$exceptionHandler" }, | |
{ "trigger": "angular: $filter", "contents": "\\$filter" }, | |
{ "trigger": "angular: $http", "contents": "\\$http" }, | |
{ "trigger": "angular: $httpBackend", "contents": "\\$httpBackend" }, | |
{ "trigger": "angular: $interpolate", "contents": "\\$interpolate" }, | |
{ "trigger": "angular: $interval", "contents": "\\$interval" }, | |
{ "trigger": "angular: $locale", "contents": "\\$locale" }, | |
{ "trigger": "angular: $location", "contents": "\\$location" }, | |
{ "trigger": "angular: $log", "contents": "\\$log" }, | |
{ "trigger": "angular: $parse", "contents": "\\$parse" }, | |
{ "trigger": "angular: $q", "contents": "\\$q" }, | |
{ "trigger": "angular: $rootElement", "contents": "\\$rootElement" }, | |
{ "trigger": "angular: $rootScope", "contents": "\\$rootScope" }, | |
{ "trigger": "angular: $sce", "contents": "\\$sce" }, | |
{ "trigger": "angular: $sceDelegate", "contents": "\\$sceDelegate" }, | |
{ "trigger": "angular: $templateCache", "contents": "\\$templateCache" }, | |
{ "trigger": "angular: $timeout", "contents": "\\$timeout" }, | |
{ "trigger": "angular: $window", "contents": "\\$window" }, | |
// provider | |
// { "trigger": "angular: $animateProvider", "contents": "\\$animateProvider" }, | |
{ "trigger": "angular: $compileProvider", "contents": "\\$compileProvider" }, | |
{ "trigger": "angular: $controllerProvider", "contents": "\\$controllerProvider" }, | |
{ "trigger": "angular: $filterProvider", "contents": "\\$filterProvider" }, | |
{ "trigger": "angular: $interpolateProvider", "contents": "\\$interpolateProvider" }, | |
{ "trigger": "angular: $locationProvider", "contents": "\\$locationProvider" }, | |
{ "trigger": "angular: $logProvider", "contents": "\\$logProvider" }, | |
{ "trigger": "angular: $parseProvider", "contents": "\\$parseProvider" }, | |
{ "trigger": "angular: $rootScopeProvider", "contents": "\\$rootScopeProvider" }, | |
{ "trigger": "angular: $sceDelegateProvider", "contents": "\\$sceDelegateProvider" }, | |
{ "trigger": "angular: $sceProvider", "contents": "\\$sceProvider" }, | |
// ========== angular.element ========== | |
// jQuery Lite | |
{ "trigger": "angular: addClass", "contents": "addClass(${1:className})" }, | |
{ "trigger": "angular: after", "contents": "after(${1:el})" }, | |
{ "trigger": "angular: append", "contents": "append(${1:el})" }, | |
{ "trigger": "angular: attr", "contents": "attr(${1:el})" }, | |
{ "trigger": "angular: bind", "contents": "bind(${1:eventType}${2:, eventData}${3:, eventHandler})" }, | |
{ "trigger": "angular: children", "contents": "children()" }, | |
{ "trigger": "angular: clone", "contents": "clone(${1:withDataAndEvents})" }, | |
{ "trigger": "angular: contents", "contents": "contents(${1:withDataAndEvents})", "description": "array sort" }, | |
{ "trigger": "angular: css", "contents": "css(${1:propertyName(s)})" }, | |
{ "trigger": "angular: data", "contents": "data(${1:key, value | obj})" }, | |
{ "trigger": "angular: empty", "contents": "empty()" }, | |
{ "trigger": "angular: eq", "contents": "eq(${1:index})" }, | |
{ "trigger": "angular: find", "contents": "find(${1:tag})" }, | |
{ "trigger": "angular: hasClass", "contents": "hasClass(${1:className})" }, | |
{ "trigger": "angular: html", "contents": "html()" }, | |
{ "trigger": "angular: next", "contents": "next()" }, | |
{ "trigger": "angular: on", "contents": "on(${1:event}, ${2:callback})" }, | |
{ "trigger": "angular: off", "contents": "off(${1:event}, ${2:callback})" }, | |
{ "trigger": "angular: one", "contents": "one(${1:event}, ${2:callback})" }, | |
{ "trigger": "angular: parent", "contents": "parent()" }, | |
{ "trigger": "angular: prepend", "contents": "prepend(${1:content})" }, | |
{ "trigger": "angular: prop", "contents": "prop(${1:propertyName})" }, | |
{ "trigger": "angular: ready", "contents": "ready(${1:handler})" }, | |
{ "trigger": "angular: remove", "contents": "remove(${1:selector})" }, | |
{ "trigger": "angular: removeAttr", "contents": "removeAttr(${1:attributeName})" }, | |
{ "trigger": "angular: removeClass", "contents": "removeClass(${1:className})" }, | |
{ "trigger": "angular: removeData", "contents": "removeData(${1:name})" }, | |
{ "trigger": "angular: replaceWith", "contents": "replaceWith(${1:newContent})" }, | |
{ "trigger": "angular: text", "contents": "text()" }, | |
{ "trigger": "angular: toggleClass", "contents": "toggleClass(${1:className})" }, | |
{ "trigger": "angular: triggerHandler", "contents": "triggerHandler(${1:eventType})" }, | |
{ "trigger": "angular: unbind", "contents": "unbind(${1:eventType}{2:, handler})" }, | |
{ "trigger": "angular: val", "contents": "val(${1:eventType}{2:, handler})" }, | |
{ "trigger": "angular: wrap", "contents": "wrap(${1:wrappingElement})" }, | |
// special jQuery Lite functions | |
{ "trigger": "angular: controller", "contents": "controller(${1:name})" }, | |
{ "trigger": "angular: injector", "contents": "injector()" }, | |
{ "trigger": "angular: scope", "contents": "scope()" }, | |
{ "trigger": "angular: isolateScope", "contents": "isolateScope()" }, | |
{ "trigger": "angular: inheritedData", "contents": "inheritedData()" }, | |
// ========== $rootScope.Scope ========== | |
// scope functions | |
{ "trigger": "angular: $apply", "contents": "\\$apply(${1:exp})" }, | |
{ "trigger": "angular: $broadcast", "contents": "\\$broadcast(${1:name}${2:, args})" }, | |
{ "trigger": "angular: $destroy", "contents": "\\$destroy()" }, | |
{ "trigger": "angular: $digest", "contents": "\\$digest()" }, | |
{ "trigger": "angular: $emit", "contents": "\\$emit(${1:name}${2:, args})" }, | |
{ "trigger": "angular: $eval", "contents": "\\$eval(${1:expression})" }, | |
{ "trigger": "angular: $evalAsync", "contents": "\\$evalAsync(${1:expression})" }, | |
{ "trigger": "angular: $new", "contents": "\\$new(${1:isolate})" }, | |
{ "trigger": "angular: $on", "contents": "\\$on(${1:name}, ${2:listener})" }, | |
{ "trigger": "angular: $watch", "contents": "\\$watch(${1:watchExpression}${2:, listener}${3:, objectEquality})" }, | |
{ "trigger": "angular: $watchCollection", "contents": "\\$watchCollection(${1:obj}, ${2:listener})" }, | |
{ "trigger": "angular: $id", "contents": "\\$id" }, | |
// logging functions | |
{ "trigger": "angular: $log.debug", "contents": "\\$log.debug('${1:debug}')" }, | |
{ "trigger": "angular: $log.error", "contents": "\\$log.error('${1:error}')" }, | |
{ "trigger": "angular: $log.info", "contents": "\\$log.info('${1:info}')" }, | |
{ "trigger": "angular: $log.log", "contents": "\\$log.log('${1:log}')" }, | |
{ "trigger": "angular: $log.warn", "contents": "\\$log.warn('${1:warning}')" }, | |
{ "trigger": "angular: $log.assertEmpty", "contents": "\\$log.assertEmpty()" }, | |
{ "trigger": "angular: $log.reset", "contents": "\\$log.reset()" }, | |
// ========== ngAnimate ========== | |
// provider | |
{ "trigger": "angular: $animateProvider", "contents": "\\$animateProvider" }, | |
// service | |
{ "trigger": "angular: $animate", "contents": "\\$animate" }, | |
// ========== ngCookies ========== | |
// service | |
{ "trigger": "angular: $cookieStore", "contents": "\\$cookieStore" }, | |
{ "trigger": "angular: $cookies", "contents": "\\$cookies" }, | |
// ========== ngMock ========== | |
// object | |
{ "trigger": "angular.mock", "contents": "angular.mock" }, | |
// provider | |
{ "trigger": "exceptionHandlerProvider", "contents": "exceptionHandlerProvider" }, | |
// function | |
{ "trigger": "angular.mock.dump", "contents": "angular.mock.dump(${1:object})" }, | |
// ========== ngResource ========== | |
// service | |
{ "trigger": "angular: $resource", "contents": "\\$resource" }, | |
// ========== ngRoute ========== | |
// provider | |
{ "trigger": "angular: $routeProvider", "contents": "\\$routeProvider" }, | |
// service | |
{ "trigger": "angular: $route", "contents": "\\$route" }, | |
{ "trigger": "angular: $routeParams", "contents": "\\$routeParams" }, | |
// ========== ngTouch ========== | |
// service | |
{ "trigger": "angular: $sanitize", "contents": "\\$sanitize" }, | |
// ========== ngTouch ========== | |
// service | |
{ "trigger": "angular: $swipe", "contents": "\\$swipe" }, | |
// ========== before current stable ========== | |
// legacy | |
{ "trigger": "angular: $animation", "contents": "\\$animation" }, | |
{ "trigger": "angular: $animator", "contents": "\\$animator" }, | |
{ "trigger": "angular: $scope", "contents": "\\$scope" } | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment