摘要: <!DOCTYPE html><html lang="zh-cn"><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv= 阅读全文
posted @ 2017-08-06 07:49 ThisCall 阅读(562) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="zh-cn" ng-app="myApp"><head> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"> <meta htt 阅读全文
posted @ 2017-08-04 13:14 ThisCall 阅读(217) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/ywl570717586/article/details/51364849 阅读全文
posted @ 2017-08-04 12:51 ThisCall 阅读(172) 评论(0) 推荐(0) 编辑
摘要: angular.module('cookieStoreExample', ['ngCookies']) .controller('ExampleController', ['$cookieStore', function($cookieStore) { //存进cookie $cookieStore 阅读全文
posted @ 2017-08-04 12:08 ThisCall 阅读(298) 评论(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 阅读(693) 评论(0) 推荐(0) 编辑
摘要: invoke() 使用注入器的invoke()方法,可以直接调用一个用户自定义的函数体,并通过函数参数 注入所依赖的服务对象,这是AngularJS推荐和惯例的用法: angular.injector(['ng']) .invoke(function($http){ //do sth. with $ 阅读全文
posted @ 2017-08-04 12:00 ThisCall 阅读(457) 评论(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 阅读(252) 评论(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 阅读(227) 评论(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 阅读(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:55 ThisCall 阅读(305) 评论(0) 推荐(0) 编辑