Angular 方法
1.angular.bootstrapUsethisfunctiontomanuallystartupangularapplication. Angularwilldetectifithasbeenloadedintothebrowsermorethanonceandonlyallowthefirstloadedscripttobebootstrappedandwillreportawarningtothebrowserconsoleforeachofthesubsequentscripts.Thispreventsstrangeresultsinapplications,whereotherwisemultipleinstancesofAngulartrytoworkontheDOM. 用法:angular.bootstrap(element,[modules]);
2.angualr.copyCreatesadeepcopyofsource,whichshouldbeanobjectoranarray. ·Ifnodestinationissupplied,acopyoftheobjectorarrayiscreated. Ifadestinationisprovided,allofitselements(forarray)orproperties(forobjects)aredeletedandthenallelements/propertiesfromthesourcearecopiedtoit. Ifisnotanobjectorarray(inc.nullandundefined),isreturned. isidenticalto'destination'anexceptionwillbethrown. 3.angular.elementWrapsarawDOMelementorHTMLstringasajQueryelement. 把原生的DOM元素或者HTML字符串作包装成JQuery元素 4.angular.fromJsonDeserializesaJSONstring.(反序列化json字符串) 5.angular.injectorCreatesaninjectorfunctionthatcanbeusedforretrievingservicesaswellasfordependencyinjection(seedependencyinjection). 6.angular.isArrayDeterminesifareferenceisanArray. 7.angular.isDateDeterminesifavalueisadate. 8.angular.isDefinedDeterminesifareferenceisdefined. 9.angular.isElementDeterminesifareferenceisaDOMelement(orwrappedjQueryelement). 10.angular.isNumberDeterminesifareferenceisaNumber. 11.angular.isStringString. 12.angular.isUndefinedDeterminesifareferenceisundefined. 13.angular.lowercase/angular.uppercaseConvertsthespecifiedstringtolowercase/uppercase. 14.angular.toJsonSerializesinputintoaJSON-formattedstring.Propertieswithleading$characterswillbestrippedsinceangularusesthisnotationinternally. 15.angualr.moduleAmoduleisacollectionofservices,directives,controllers,filters,andconfigurationinformation.angular.moduleisusedtoconfigurethe$injector. // Create a new module var myModule = angular.module('myModule', []); // register a new service myModule.value'appName' 'MyCoolApp');// configure existing services inside initialization blocks.config(['$locationProvider'function($locationProvider){// Configure existing providers $locationProviderhashPrefix'!'}]); Then you can create an injector and load your modules like this: injector injector'ng']) However it's more likely that you'll just usengAppor
Usage
Arguments
Returns
以上内容整理了官网 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- Scala / Spark数据帧:找到与max相对应的列名
- unix – bc:获取num列表的总和
- angular – 通过控制台获取服务实例
- AngularJS学习笔记--002--Angular JS路由插件ui.router源码
- 数组 – 当设置nounset时,如何“ – @ – expand(”${array
- 某些bash脚本中使用的“function”关键字是什么?
- Angular2:ElementRef nativeElement vs querySelector性能
- AngularJS学习之二:配置本地开发环境
- WebService之使用xml文件生成客户端代码
- bootstrap table分页模板和获取表中的ID方法