ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Angular​JS Snippets

by maxhoffmann ST2/ST3

:page_with_curl: Sublime Text Snippets and Completions for Angular.js

Labels snippets

Details

Installs

  • Total 77K
  • Win 44K
  • OS X 20K
  • Linux 13K
Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4
Windows 1 27 32 37 8 18 29 19 16 34 32 15 16 25 19 26 28 26 19 20 19 31 46 35 31 18 15 25 40 33 41 45 14 21 33 31 34 49 18 22 28 22 31 29 38 29
OS X 0 3 9 10 2 3 7 3 4 6 4 3 2 6 4 3 5 9 4 7 2 6 5 5 4 3 1 5 5 3 8 9 8 7 6 13 7 3 10 3 1 5 4 7 7 11
Linux 0 2 12 5 3 5 3 5 6 4 5 6 4 10 5 6 7 4 2 5 8 10 10 11 4 4 8 8 5 7 7 8 3 8 10 10 9 4 5 3 4 13 2 4 7 2

Readme

Source
raw.​githubusercontent.​com

Angular.js Snippets for Sublime Text

This snippet library provides completions for Angular.js’s stable and unstable branch. Sublime Text uses fuzzy searching for snippets and completions therefore you don’t have to write triggers completely. All snippets add Angular’s inline notation for dependencies automatically, so you don’t have to type them twice.

Installation

  • Package Control: install the package “AngularJS Snippets”
  • Manual: copy files to your Sublime Text User folder

IMPORTANT

Completions won’t show in HTML unless you have added this line to your User.sublime-preferences:

"auto_complete_triggers": [ {"selector": "text.html", "characters": "<"}, {"selector": "text.html meta.tag", "characters": " " } ]

Snippet Categories: - Services - Directives - Globals - jQuery lite - Scope functions - Log functions - Variables

Services

triggercompletion
config
config([function() {
    |
}])
constant
constant('{name}', {value})
controller
controller('{Name}Ctrl', [function ({$scope}) {
    |
}])
decorator
decorator('{name}', [function ($provide) {
    $provide.decorator('{name}', [function($delegate) {
        return {$delegate}|;
    }]);
}])
directive
directive('{name}', [function () {
    return {
        restrict: '{A}',
        link: function(scope, iElement, iAttrs) {
            |
        }
    };
}])
directivelong
directive('{name}', [function () {
    return {|
        priority: 0,
        template: '<div></div>',
        templateUrl: 'directive.html',
        replace: true,
        transclude: true,
        restrict: 'A',
        scope: {},
        controller: function($scope, $element, $attrs, $transclude, otherInjectables) {

        },
        compile: function compile(tElement, tAttrs, transclude) {
            return function postLink(scope, iElement, iAttrs, controller) {

            }
        },
        link: function postLink(scope, iElement, iAttrs) {

        }
    };
}])
factory
factory('{name}', [function () {
    |

    return {

    };
}])
otherwise
otherwise({ redirectTo: '/{route}' })
provider
provider('{name}', [function () {
    |

    this.$get = [function() {
        return {

        };
    }];
}])
run
run([function() {
    |
}])
service
service('{name}', [function () {
    |
}])
value
value('{name}', {value})
when
when('/{name}', {
    templateUrl: '{name}.html',
    controller: '{Name}Ctrl'
})

Directives

triggercompletion
ng-animateng-animate=“{enter: ‘{example}-enter’, leave: ‘{example}-leave’}”
ng-animatesng-animate=“‘{class-prefix}’”
ng-appng-app=“”
ng-bindng-bind=“”
ng-bind-html-unsafeng-bind-html-unsafe=“”
ng-bind-templateng-bind-template=“”
ng-changeng-change=“”
ng-checkedng-checked=“”
ng-classng-class=“”
ng-class-evenng-class-even=“”
ng-class-oddng-class-odd=“”
ng-clickng-click=“”
ng-cloakng-cloak
ng-controllerng-controller=“{Name}Ctrl”
ng-dblclickng-dblclick=“”
ng-disabledng-disabled=“”
ng-formng-form=“”
ng-hideng-hide=“”
ng-hrefng-href=“”
ng-ifng-if=“”
ng-includeng-include=“{template}” {onload=“” autoscroll=“”}
ng-initng-init=“”
ng-keydownng-keydown=“”
ng-keypressng-keypress=“”
ng-keyupng-keyup=“”
ng-listng-list=“”
ng-modelng-model=“”
ng-mousedownng-mousedown=“”
ng-mouseenterng-mouseenter=“”
ng-mouseleaveng-mouseleave=“”
ng-mousemoveng-mousemove=“”
ng-mouseoverng-mouseover=“”
ng-mouseupng-mouseup=“”
ng-multipleng-multiple=“”
ng-nbindng-non-bindable=“”
ng-openng-open=“”
ng-pluralizeng-pluralize count=“” when=“”: ‘{}’“
ng-readonlyng-readonly=”“
ng-repeatng-repeat=”{item} in {array}“
ng-selectedng-selected=”“
ng-showng-show=”“
ng-srcng-src=”“
ng-styleng-style=”“
ng-submitng-submit=”“
ng-swipe-leftng-swipe-left=”“
ng-swipe-rightng-swipe-right=”“
ng-switchng-switch on=”“
ng-switch-defaultng-switch-default=”“
ng-switch-whenng-switch-when=”“
ng-transcludeng-transclude
ng-viewng-view

Globals

triggercompletion
angular.bind
angular.bind({self}, {function})
angular.bootstrap
angular.bootstrap({element}{, [{modules}]})
angular.copy
angular.copy({source}{, {destination}})
angular.element
angular.element({element})
angular.equals
angular.equals({obj1}, {obj2})
angular.extend
angular.extend({destination}, {source})
angular.forEach
angular.forEach({obj}, {iterator})
angular.fromJson
angular.fromJson({jsonString})
angular.identity
angular.identity()
angular.injector
angular.injector([{modules}])
angular.isArray
angular.isArray({value})
angular.isDate
angular.isDate({value})
angular.isDefined
angular.isDefined({value})
angular.isElement
angular.isElement({value})
angular.isFunction
angular.isFunction({value})
angular.isNumber
angular.isNumber({value})
angular.isObject
angular.isObject({value})
angular.isString
angular.isString({value})
angular.isUndefined
angular.isUndefined({value})
angular.lowercase
angular.lowercase({string})
angular.module
angular.module('{moduleName}', [])
angular.noop
angular.noop
angular.toJson
angular.toJson({string})
angular.uppercase
angular.uppercase({string})
angular.version
angular.version

jQuery lite

triggercompletion
angular: addClass
addClass({className})
angular: after
after({el})
angular: append
append({el})
angular: attr
attr({el})
angular: bind
bind({eventType}{, eventData}{, eventHandler})
angular: children
children()
angular: clone
clone({withDataAndEvents})
angular: contents
contents({withDataAndEvents})
angular: css
css({propertyName(s)})
angular: data
data({key, value | obj})
angular: eq
eq({index})
angular: find
find({tag})
angular: hasClass
hasClass({className})
angular: html
html()
angular: next
next()
angular: parent
parent()
angular: prepend
prepend({content})
angular: prop
prop({propertyName})
angular: ready
ready({handler})
angular: remove
remove({selector})
angular: removeAttr
removeAttr({attributeName})
angular: removeClass
removeClass({className})
angular: removeData
removeData({name})
angular: replaceWith
replaceWith({newContent})
angular: text
text()
angular: toggleClass
toggleClass({className})
angular: triggerHandler
triggerHandler({eventType})
angular: unbind
unbind({eventType{, handler})
angular: val
val({eventType{, handler})
angular: wrap
wrap({wrappingElement})
angular: controller
controller({name})
angular: injector
injector()
angular: scope
scope()
angular: inheritedData
inheritedData()

Scope functions

triggercompletion
angular: $apply
apply({exp})
angular: $broadcast
broadcast({name}{, args})
angular: $destroy
destroy()
angular: $digest
digest()
angular: $emit
emit({name}{, args})
angular: $eval
eval({expression})
angular: $evalAsync
evalAsync({expression})
angular: $new
new({isolate})
angular: $on
on({name}, {listener})
angular: $watch
watch({watchExpression}{, listener}{, objectEquality})
angular: $watchCollection
watchCollection({obj}, {listener})
angular: $id
id

Log functions

triggercompletion
angular: $log.debug
log.debug('{debug}')
angular: $log.error
log.error('{error}')
angular: $log.info
log.info('{info}')
angular: $log.log
log.log('{log}')
angular: $log.warn
log.warn('{warning}')
angular: $log.assertEmpty
log.assertEmpty()
angular: $log.reset
log.reset()

Variables

triggercompletion
angular: $angular
angular
angular: $anchorScroll
anchorScroll
angular: $animation
animation
angular: $animator
animator
angular: $cacheFactory
cacheFactory
angular: $compile
compile
angular: $controller
controller
angular: $exceptionHandler
exceptionHandler
angular: $location
location
angular: $locationProvider
locationProvider
angular: $log
log
angular: $parse
parse
angular: $resource
resource
angular: $rootElement
rootElement
angular: $rootScope
rootScope
angular: $route
route
angular: $routeParams
routeParams
angular: $routeProvider
routeProvider
angular: $templateCache
templateCache
angular: $timeout
timeout
angular: $scope
scope

LICENSE

The MIT License (MIT)