AngularJS API Docs
Welcome to the AngularJS API docs page. These pages contain the AngularJS reference materials for version 1.2.6 taco-salsafication.
歡迎使用AngularJS API 文檔頁,這些頁面含有了AngularJS (引用材料為1.2.6 taco-salsafication版本)
The documentation is organized into modules which contain various components of an AngularJS application. These components are directives, services, filters, providers, types, global APIs and testing mocks.
文檔被組織化為模塊(含有各種各樣的組件的AngularJS 應用程序).這些模塊是寫指定、服務、過濾器、providers,類型、全局API和測試模塊.
Angular Namespaces $ and $$To prevent accidental name collisions with your code, Angular prefixes names of public objects with $ and names of private objects with $$. Please do not use the $ or $$ prefix in your code.
Angular Namespaces $ 及$$ 用於阻止你程序中意外的命名沖突.公共的對象Angular用$前綴表示,私有的對象Angular 用$$前綴表示.請不要用這兩個符號在你自己的代碼對象中.
Angular Namespace Angular 命名空間
ng (core module) ng核心模塊
This module is provided by default and contains the core components of AngularJS.
該模塊通默認提供,且含有核心AngularJS組件
This is the core collection of directives you would use in your template code to build an AngularJS application. 這是一個將會用於你的模板代碼中的核心的指令集,你可以用這些指令集來創建一個AngularJS 程序. |
|
This is the core collection of services which are used within the DI of your application. 這是一個核心服務集合(這些核心服務集合用於你程序中的依賴注入) Some examples include: $compile, $http, $routeParams, $location, etc… 一些例子包含:$compile, $http, $routeParams, $location,等 |
|
The core filters available in the ng module are used to transform template data before it is renders within directives and expressions. 核心的過濾器集合(在ng module 可用),被用於傳輸模板數據(在這些模板數據渲染與指令集和表達式之前) 一些例子包含: filter, date, currency, lowercase, uppercase, etc... |
|
The core global API functions are attached to the angular object. These core functions are useful for low level JavaScript operations within your application. 核心全局API函數,屬於angular 對象中.這些函數很有用於你程序中的javascript操作. 一些例子包含: angular.copy(), angular.equals(), angular.element(), etc... |
Use ngRoute to enable URL routing to your application. The ngRoute module supports URL management via both hashbang and HTML5 pushState.
使用ngRoute 可使你的程序URL擁有路由能力.該模塊支持URL管理(通過hashbang 和HTML5 pushState
Include the angular-route.js file and set ngRoute as a dependency for this to work in your application.
其中包含angular-route.js 文件和在你的應用程序中將ngRoute設置為一個dependency 的功能.
The following services are used for route management: 下面的服務被用於路由管理:
$routeProvideris used to register routes for the application. 被用於給你的程序注冊路由 |
|
The ngView directive will display the template of the current route within the page. The ngView 指令將用於呈現頁面中當前路由的模板 |
Use ngAnimate to enable animation features into your application. Various core ng directives will provide animation hooks into your application when ngAnimate is included. Animations are defined by using CSS transitions/animations or JavaScript callbacks.
可使用ngAnimate 讓你的程序用於動畫特征.只要ngAnimate 被引入,各式各樣的核心ng指令將給你的程序提供動畫鈎子.這些動畫可使用css或者javascript回調來定義.
Include the angular-animate.js file and set ngAnimate as a dependency for this to work in your application.
其中包含angular-animate.js 文件和在你的應用程序中將ngRoute設置為一個dependency 的功能.
Use $animate to trigger animation operations within your directive code. 可使用$animate 來觸發你程序中的動畫操作. |
|
Follow ngAnimate’s CSS naming structure to reference CSS transitions / keyframe animations in AngularJS. Once defined the animation can be triggered by referencing the CSS class within the HTML template code. AngularJS中遵行ngAnimate的css命名結構來引用css transitions /keyframe 動畫.因為定義的動畫能夠通過引用css類來觸發. |
|
Use module.animation() to register a JavaScript animation. Once registered the animation can be triggered by referencing the CSS class within the HTML template code. 使用 來注冊javascript動畫.因為注冊的動畫能夠通過引用css類來觸發 |
Use the ngResource module when querying and posting data to a REST API.
當get或post請求道rest api時,可使用ngResource 模塊
Include the angular-resource.js file and set ngResource as a dependency for this to work in your application.
其中包含angular-resource.js 文件和在你的應用程序中將ngResource 設置為一個dependency 的功能.
The $resource service is used to define RESTful objects which communicate with a REST API. $resource服務被用於定義restful對象(restful對象用於和rest api通信) |
Use the ngCookies module to handle cookie management within your application.
使用restful對象可在你的應用程序中操作cookie.
Include the angular-cookies.js file and set ngCookies as a dependency for this to work in your application.
其中包含angular-cookies.js 文件和在你的應用程序中將ngCookies 設置為一個dependency 的功能.
The following services are used for cookie management: 下面的服務用於cookie管理.
$cookie是一個方便的封裝(用來存儲瀏覽器cookie中的簡單數據) $cookieStoreis used to store more complex data using serialization. $cookieStroe被用於存儲更多復雜的數據(通過序列化) |
|
|
|
Use ngTouch when developing for mobile browsers/devices.
當開發手機等設備是,可使用ngTouch
Include the angular-touch.js file and set ngTouch as a dependency for this to work in your application.
其中包含angular-touch.js 文件和在你的應用程序中將ngTouch 設置為一個dependency 的功能.
The $swipe service is used to register and manage mobile DOM events. $swipe 服務用於注冊和管理手機dom事件 |
|
Various directives are available in ngTouch to emulate mobile DOM events. 各式各樣的指定可用於ngTouch 來模仿手機dom事件. |
Use ngSanitize to securely parse and manipulate HTML data in your application.
你的程序中可使用ngSanitize 可安全地轉換和操作html數據.
Include the angular-sanitize.js file and set ngSanitize as a dependency for this to work in your application.
其中包含angular-sanitize.js 文件和在你的應用程序中將sanitize設置為一個dependency 的功能.
The $sanitize service is used to clean up dangerous HTML code in a quick and convenient way. Sanitize服務被用於清理危險的html代碼. |
|
The linky filter is used to turn URLs into HTML links within the provided string. linky filter 用於將url轉化為html連接. |
Use ngMock to inject and mock modules, factories, services and providers within your unit tests
使用ngMock 可注入和mock模塊、工廠、服務、providers
Include the angular-mocks.js file into your test runner for this to work.
其中包含 angular-mocks.js文件.
ngMock will extend the behavior of various core services to become testing aware and manageable in a synchronous manner. ngMock將擴展各種核心服務的行為,可用於測試 例子包括: $timeout, $interval, $log, $httpBackend, etc... |
|
Various helper functions are available to inject and mock modules within unit test code. 各種幫助函數可用於注入和mock模塊(單元測試代碼) |