摘要: http://blog.csdn.net/ywl570717586/article/details/51364849 阅读全文
posted @ 2017-08-04 12:51 ThisCall 阅读(165) 评论(0) 推荐(0) 编辑
摘要: angular.module('cookieStoreExample', ['ngCookies']) .controller('ExampleController', ['$cookieStore', function($cookieStore) { //存进cookie $cookieStore 阅读全文
posted @ 2017-08-04 12:08 ThisCall 阅读(297) 评论(0) 推荐(0) 编辑
摘要: var app=angular.module('kaifanla',['ng','ngRoute']);app.config(function($routeProvider){ //添加路由 $routeProvider .when('/文件名',{ templateUrl:'tpl/start.h 阅读全文
posted @ 2017-08-04 12:04 ThisCall 阅读(691) 评论(0) 推荐(0) 编辑
摘要: invoke() 使用注入器的invoke()方法,可以直接调用一个用户自定义的函数体,并通过函数参数 注入所依赖的服务对象,这是AngularJS推荐和惯例的用法: angular.injector(['ng']) .invoke(function($http){ //do sth. with $ 阅读全文
posted @ 2017-08-04 12:00 ThisCall 阅读(454) 评论(0) 推荐(0) 编辑
摘要: var app = angular.module('myApp', ['ng']);//创建一个自定义服务app.factory('$Debug', function () { return { debugSwitch:true, log: function (msg) { if(this.debu 阅读全文
posted @ 2017-08-04 11:58 ThisCall 阅读(251) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta charset="UTF-8"> <script src="js/angular.js"></script> <title></title></head><body><div ng- 阅读全文
posted @ 2017-08-04 11:56 ThisCall 阅读(226) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta charset="UTF-8"> <script src="js/angular.js"></script> <title></title></head><body><div ng- 阅读全文
posted @ 2017-08-04 11:56 ThisCall 阅读(300) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta charset="UTF-8"> <script src="js/angular.js"></script> <title></title></head><body><div ng- 阅读全文
posted @ 2017-08-04 11:55 ThisCall 阅读(303) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta charset="UTF-8"> <script src="js/angular.js"></script> <title></title></head><body><div ng- 阅读全文
posted @ 2017-08-04 11:54 ThisCall 阅读(306) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta charset="UTF-8"> <script src="js/angular.js"></script> <title></title></head><body><div ng- 阅读全文
posted @ 2017-08-04 11:53 ThisCall 阅读(179) 评论(0) 推荐(0) 编辑