Angular 方法
来源:互联网 发布:妖气漫画网软件 编辑:程序博客网 时间:2024/05/20 05:31
1. angular.bootstrap
Use this function to manually start up angular application.
Angular will detect if it has been loaded into the browser more than once and only allow the first loaded script to be bootstrapped and will report a warning to the browser console for each of the subsequent scripts. This prevents strange results in applications, where otherwise multiple instances of Angular try to work on the DOM.
用法:angular.bootstrap(element, [modules]);
2. angualr.copy
Creates a deep copy of source, which should be an object or an array.
· If no destination is supplied, a copy of the object or array is created.
· If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it.
· If source is not an object or array (inc. null and undefined), source is returned.
· If source is identical to 'destination' an exception will be thrown.
3. angular.element
Wraps a raw DOM element or HTML string as a jQuery element.
把原生的DOM元素或者HTML字符串作包装成JQuery元素
4.angular.fromJson
Deserializes a JSON string.(反序列化json字符串)
5.angular.injector
Creates an injector function that can be used for retrieving services as well as for dependency injection (seedependency injection).
6.angular.isArray
Determines if a reference is an Array.
7.angular.isDate
Determines if a value is a date.
8. angular.isDefined
Determines if a reference is defined.
9.angular.isElement
Determines if a reference is a DOM element (or wrapped jQuery element).
10.angular.isNumber
Determines if a reference is a Number.
11.angular.isString
Determines if a reference is a String.
12.angular.isUndefined
Determines if a reference is undefined.
13.angular.lowercase/angular.uppercase
Converts the specified string to lowercase/uppercase.
14.angular.toJson
Serializes input into a JSON-formatted string. Properties with leading $ characters will be stripped since angular uses this notation internally.
15. angualr.module
A module is a collection of services, directives, controllers, filters, and configuration information. angular.module is used to configure the$injector.
// Create a new modulevar myModule = angular.module('myModule', []);// register a new servicemyModule.value('appName', 'MyCoolApp');// configure existing services inside initialization blocks.myModule.config(['$locationProvider', function($locationProvider) { // Configure existing providers $locationProvider.hashPrefix('!');}]);
Then you can create an injector and load your modules like this:
var injector = angular.injector(['ng', 'myModule'])
However it's more likely that you'll just use ngApp or angular.bootstrap
to simplify this process for you.
Usage
angular.module(name, [requires], [configFn]);
Arguments
The name of the module to create or retrieve.
requiresIf specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
configFnOptional configuration function for the module. Same as Module#config().
Returns
modulenew module with the angular.Module
api.
以上内容整理了官网
- Angular 方法
- angular.copy方法
- angular.equals方法
- angular.extend方法
- angular.element的方法
- angular.element方法汇总
- angular form addControl方法
- Angular操作cookies方法
- angular.element方法汇总
- angular的run方法
- angular $apply方法
- angular.element方法汇总
- angular.extend方法
- angular.element 的方法
- angular.element方法汇总
- angular.element 方法汇总
- 【Angular】ngOnInit()方法介绍
- angular 排序多种方法
- 使用boost库时,遇到如下问题
- java学习
- 传智播客说:大学生们,先让自己值钱,再赚钱!
- 学习笔记:Quartz初印象
- Android性能优化典范之多线程篇
- Angular 方法
- linux 系统的 ctags 以及Makefile的应用
- 字典
- python语言磁力搜索引擎源码公开,基于DHT协议
- 数据库查询语句专题
- DP算法---最长公共子序列
- 栈+哈希表(或者稀疏数组)解决安卓购物车新添加货物置顶的问题
- SICP 练习1.16
- Spring 之注解事务 @Transactional propagation属性详解