AngularJS Atom

其他类别 2025-07-29

Angularjs v1.x原子支持

将语法突出显示和片段添加到Antom中的Angularjs v1.x。

最初是从Angularjs Textmate Bundle转换的。

贡献非常感谢。请提供此存储库,并打开拉动请求以添加片段,进行语法调整,等等。

支持的功能

自动完成

您可以在HTML和Angular.js的变量和JavaScript中使用自动组件进行指令。有关更多详细信息,请参见设置。

如果您键入一些前缀并按下选项卡Enter ,则可以在下面使用自动完成。

html

 ng-app
ng-bind
ng-bind-html
ng-bind-template
ng-blur
ng-change
ng-checked
ng-class
ng-class-even
ng-class-odd
ng-click
ng-cloak
ng-controller
ng-copy
ng-csp
ng-cut
ng-dblclick
ng-disabled
ng-focus
ng-form
ng-hide
ng-href
ng-if
ng-include
ng-init
ng-jq
ng-keydown
ng-keypress
ng-keyup
ng-list
ng-model
ng-model-options
ng-mousedown
ng-mouseenter
ng-mouseleave
ng-mousemove
ng-mouseover
ng-mouseup
ng-non-bindable
ng-open
ng-pluralize
ng-show
ng-transclude
ng-view
ng-messages
ng-message
ng-messages-include
ng-swipe-left
ng-swipe-righ
ng-dirty
ng-false-value
ng-invalid
ng-maxlength
ng-minlength
ng-message-exp
ng-options
ng-paste
ng-pattern
ng-pristine
ng-readonly
ng-required
ng-repeat
ng-repeat-start
ng-repeat-end
ng-selected
ng-src
ng-srcset
ng-style
ng-submit
ng-switch
ng-switch-when
ng-switch-default
ng-trim
ng-true-value
ng-valid
ng-value

JavaScript

 angular
bind
bootstrap
copy
element
equals
extend
forEach
fromJson
identity
injector
isArray
isDate
isDefined
isElement
isFunction
isNumber
isObject
isString
isUndefined
lowercase
module
noop
reloadWithDebugInfo
toJson
uppercase
$anchorScroll
$animate
$cacheFactory
$compile
$controller
$document
$exceptionHandler
$filter
$http
$httpBackend
$interpolate
$interval
$locale
$location
$log
$parse
$q
$rootElement
$rootScope
$sce
$sceDelegate
$templateCache
$templateRequest
$timeout
$window
$animateProvider
$compileProvider
$controllerProvider
$filterProvider
$httpProvider
$interpolateProvider
$locationProvider
$logProvider
$parseProvider
$rootScopeProvider
$sceDelegateProvider
$sceProvider
$injector
$provide
$ariaProvider
$aria
$cookieStore
$cookies
mock
$exceptionHandlerProvider
TzDate
dump
inject
$resource
$routeProvider
$route
$routeParams
$sanitize
$swipe
controller
$scope
service
factory
provider
ngResource
defer
config
when
otherwise
directive
run
filter

摘要

您可以在HTML和JavaScript中使用摘要。有关更多详细信息,请参见摘要。

如果您键入前缀并按下选项tab ,则将其替换为摘要。

html

ngindex
 

  


 $2


NGA
 
ngst
 
nginc
 
ngplural
 
Ngswitch
 $2
ngtmpl
 
ngview
 

JavaScript

NGM
 angular.module('$1', [$2])$3
NGMA
 var $1 = angular.module('$2', [$3])$4
NGMC
 var $1 = angular.module('$2', [$3], function($4) {
    $5
})$6
ngmfa
 factory('$1', function($2) {
  $3
})$4
ngmfi
 filter('$1', function($2) {
  return function (input, $3) {
    $4
  };
})$5
NGMS
 service('$1', function($2) {
  $3
})$4
ngro
 $routeProvider.otherwise({redirectTo: '$1' });
NGRW
 $routeProvider.when('$1', {templateUrl: '$2', controller: '$3'});
NGRWR
 $routeProvider.when('$1', {templateUrl: '$2', controller: '$3', resolve: {$4} });
ngfor
 angular.forEach($1, function(value, key) {
  $2
});
ngdl
 .directive('$1', function($2) {
  $3
  return function(scope, element, attrs) {
    $4
  }
})$5
ngdlf
 function (scope, element, attrs) {
  $1
}
NGDC
 .directive('$1', function factory($2) {
  var directiveDefinitionObject = {
    $3
    compile: function compile(tElement, tAttrs, transclude) {
      $4
      return function (scope, element, attrs) {
        $5
      }
    }
  };
  return directiveDefinitionObject;
})$6
ngdcf
 function compile(tElement, tAttrs, transclude) {
  $1
  return function (scope, element, attrs) {
    $2
  }
}$3
NGB
 $scope.$broadcast('$1', $2);
NGE
 $scope.$emit('', );
NGF
 $scope.$1 = function($2) {
  $3
};
NGCP
 $1Ctrl.prototype.$2 = function $2($3) {
  $4
};
恩贡
 $scope.$on('$1', function(event, $2) {
  $3
});
NGV
 $scope.$1 = $2;
NGW
 $scope.$watch('$1', function(newValue, oldValue) {
  $2
});

NGTO

 $timeout(function() {
  $2
}, $1)
NGC
 var $1 = function($scope, $2) {
  $3
}
NGC $
 $1Ctrl.$inject = [$scope, '$2'];
function $1Ctrl($scope, $2) {
  $4
}
angular.module($3).controller('$1Ctrl', $1Ctrl);
ngdoc
 /**
 * @ngdoc ${1:function}
 * @name $2
 * @description
 * $3
 *
 */
nghttp
 $http({method: '${1:GET}', url: '$2'})
.success(function(data, status, headers, config) {
  $3
})
.error(function(data, status, headers, config) {
  $4
});
ngcopy
 angular.copy(${1:source} ${2:, ${3:destination}})
ngel
 angular.element(${1:element});
NGEQ
 angular.equals(${1:object1}, ${2:object2});
ngext
 angular.extend(${1:destinationObject}, ${2:sourceObject})
ngisa
 angular.isArray(${1:value})
NGISD
 angular.isDefined(${1:value})
恩格夫
 angular.isFunction(${1:value})
ngisn
 angular.isNumber(${1:value})
ngiso
 angular.isObject(${1:value})
恩吉斯
 angular.isString(${1:value})
nglo
 angular.lowercase(${1:string});
ngup
 angular.uppercase(${1:string});

常问问题

安装EMET插件时,我无法使用标签使用自动完成

请参阅Emmet的文档

在您的keymap.cson中,添加以下代码。

 'atom-text-editor[data-grammar="text html angular"]:not([mini])':
  'tab': 'emmet:expand-abbreviation-with-tab'
下载源码

通过命令行克隆项目:

git clone https://github.com/angular-ui/AngularJS-Atom.git