本文通过设置Access-Control-Allow-Origin来实现跨域。 例如:客户端的域名是client.runoob.com,而请求的域名是server.runoob.com。 如果直接使用ajax访问,会有以下错误: XMLHttpRequest cannot load http://s ...
分类:
Web程序 时间:
2017-02-24 14:24:38
阅读次数:
191
angular的silkydream项目 安装angular的generator npm install -g generator-angular 组建项目 yo angular silkydream 使用git将项目推送至github git add -A git commit -m "finsh ...
分类:
其他好文 时间:
2017-02-23 22:00:34
阅读次数:
200
Git分支管理的基本操作 首先从远端版本库clone下来一个全新的库: git clone username@xxx:/xxx/xxx.git 此时clone下来的,只是master分支,没有其他分支。 查看分支: git branch #查看本地分支 git branch -r #查看远端分支 g ...
分类:
其他好文 时间:
2017-02-22 19:51:10
阅读次数:
204
CORS 全称"跨域资源共享"(Cross-origin resource sharing)。 跨域就是不同域之间进行数据访问,比如 a.sample.com 访问 b.sample.com 中的数据,我们如果不做任何处理的话,就会出现下面的错误: XMLHttpRequest cannot loa ...
分类:
Web程序 时间:
2017-02-22 19:49:29
阅读次数:
303
JS调用接口最需要注意的就是跨域问题 在.net平台下使js跨域变得非常简单 1、在nuget中引用 Microsoft ASP.NET Web API 2.2 Cross-Origin Support 包 2、再 Application_Start() 中加入 //跨域 GlobalConfigu ...
摘自:http://jsrookie.iteye.com/blog/2318972 L.Map API各种类中的核心部分,用来在页面中创建地图并操纵地图。 Constructor(构造器) 通过div元素和带有地图选项的描述的文字对象来实例化一个地图对象,其中文字对象是可选的。 Options(选项 ...
<!--?xml version="1.0" encoding="UTF-8"?--> 修改spec文件的version: git commit -am"version 0.1.1" git push origin master -u git tag 0.1.1 git push --tags 在包 ...
分类:
移动开发 时间:
2017-02-20 15:01:36
阅读次数:
289
一、常用命令: git merge 另一分支名 //在当前分支下,合并另一分支 git checkout 另一分支名 //在当前分支下,检出到另一分支 git pull origin 分支名 //在当前分支下,拉取origin上的代码 git push origin 分支名 //在当前分支下,提交代 ...
分类:
其他好文 时间:
2017-02-20 11:41:53
阅读次数:
169
For example we have a component: For TodoAppComponent, we make 'TodoList' as 'viewProviders'. And inside TodoAppComponent, we have TodoInputComponent ...
分类:
其他好文 时间:
2017-02-20 01:01:33
阅读次数:
209
看个题目 1 #include<iostream> 2 using namespace std; 3 int gcd(int a,int b) 4 { 5 if(b==0) 6 { 7 return a; 8 } 9 else 10 { 11 return gcd(b,a%b); 12 } 13 } ...
分类:
其他好文 时间:
2017-02-19 23:39:59
阅读次数:
333