-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
118 lines (65 loc) · 13.9 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>evelyn.li</title>
<subtitle>https://qingflow.com</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://tingtingli911.github.io/"/>
<updated>2017-03-22T04:03:56.000Z</updated>
<id>http://tingtingli911.github.io/</id>
<author>
<name>Evelyn</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>node使用笔记</title>
<link href="http://tingtingli911.github.io/2017/03/22/node%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0/"/>
<id>http://tingtingli911.github.io/2017/03/22/node使用笔记/</id>
<published>2017-03-22T03:54:08.000Z</published>
<updated>2017-03-22T04:03:56.000Z</updated>
<content type="html"><![CDATA[<h4 id="1-npm-install-迷之失败"><a href="#1-npm-install-迷之失败" class="headerlink" title="1. npm install 迷之失败"></a>1. npm install 迷之失败</h4><p>主要报错内容如下:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">npm ERR! Darwin 16.4.0</span><br><span class="line">npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "gulp-cli"</span><br><span class="line">npm ERR! node v6.7.0</span><br><span class="line">npm ERR! npm v3.10.3</span><br><span class="line">npm ERR! code ETIMEDOUT</span><br><span class="line">npm ERR! errno ETIMEDOUT</span><br><span class="line">npm ERR! syscall connect</span><br><span class="line"></span><br><span class="line">npm ERR! Cannot read property 'path' of null </span><br></pre></td></tr></table></figure><p>公司网络最近很差,开始怀疑公司网络=》终端使用代理失败=》终于找到类似问题,解决方案如下:<br><code>npm config set registry http://registry.npmjs.org/</code></p><p>难道是因为https挂了??</p>]]></content>
<summary type="html">
<h4 id="1-npm-install-迷之失败"><a href="#1-npm-install-迷之失败" class="headerlink" title="1. npm install 迷之失败"></a>1. npm install 迷之失败</h4><p>主要报错
</summary>
<category term="node" scheme="http://tingtingli911.github.io/tags/node/"/>
</entry>
<entry>
<title>初学ionic</title>
<link href="http://tingtingli911.github.io/2016/12/05/%E5%88%9D%E5%AD%A6ionic/"/>
<id>http://tingtingli911.github.io/2016/12/05/初学ionic/</id>
<published>2016-12-05T12:30:33.000Z</published>
<updated>2016-12-05T12:53:51.000Z</updated>
<content type="html"><![CDATA[<h3 id="1-Ionic2-多语言支持"><a href="#1-Ionic2-多语言支持" class="headerlink" title="1. Ionic2 多语言支持"></a>1. Ionic2 多语言支持</h3><p>看了半天的Angular2官方文档,没有搞太明白,主要原因是官方使用的是SystemJs而不是Webpack。经过曲折的经历,终于找到了一个非常适合Ionic2翻译的插件--ng2-translate。使用起来非常简单,尤其是对于ionic。(附上官方文档链接:<a href="http://ionicframework.com/docs/v2/resources/ng2-translate/" target="_blank" rel="noopener">http://ionicframework.com/docs/v2/resources/ng2-translate/</a>)</p><ol><li><p>安装ng2-translate:</p><p><code>npm install ng2-translate --save</code></p></li><li><p>修改/src/app/app.module.ts<br>加入以下代码:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">import {HttpModule, Http} from '@angular/http';</span><br><span class="line">import { TranslateModule, TranslateStaticLoader, TranslateLoader } from 'ng2-translate/ng2-translate';</span><br><span class="line">export function createTranslateLoader(http: Http) {</span><br><span class="line">return new TranslateStaticLoader(http, 'assets/i18n', '.json');</span><br><span class="line">}</span><br></pre></td></tr></table></figure><p>更改import部分:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">@NgModule({</span><br><span class="line">imports: [</span><br><span class="line"> TranslateModule.forRoot({</span><br><span class="line"> provide: TranslateLoader,</span><br><span class="line"> useFactory: (createTranslateLoader),</span><br><span class="line"> deps: [Http]</span><br><span class="line"> })</span><br><span class="line">]</span><br><span class="line">})</span><br></pre></td></tr></table></figure></li><li><p>修改/src/app/app.component.ts</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">import {TranslateService} from 'ng2-translate';</span><br><span class="line">@Component({</span><br><span class="line"> templateUrl: 'app.html'</span><br><span class="line">})</span><br><span class="line">export class MyApp {</span><br><span class="line"> rootPage = HomePage;</span><br><span class="line"></span><br><span class="line"> constructor(platform: Platform, translate: TranslateService) {</span><br><span class="line"> platform.ready().then(() => {</span><br><span class="line"> // Okay, so the platform is ready and our plugins are available.</span><br><span class="line"> // Here you can do any higher level native things you might need.</span><br><span class="line"> StatusBar.styleDefault();</span><br><span class="line"> Splashscreen.hide();</span><br><span class="line"> });</span><br><span class="line"></span><br><span class="line"> translate.setDefaultLang('cn');</span><br><span class="line"> translate.use('cn');</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>使用方法<br>使用方法很简单,参考<a href="https://github.com/ocombe/ng2-translate" target="_blank" rel="noopener">ng2-translate</a>介绍即可</p></li></ol>]]></content>
<summary type="html">
<h3 id="1-Ionic2-多语言支持"><a href="#1-Ionic2-多语言支持" class="headerlink" title="1. Ionic2 多语言支持"></a>1. Ionic2 多语言支持</h3><p>看了半天的Angular2官方文档,没有
</summary>
<category term="前端开发" scheme="http://tingtingli911.github.io/categories/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/"/>
<category term="Angular2" scheme="http://tingtingli911.github.io/tags/Angular2/"/>
<category term="JavaScript" scheme="http://tingtingli911.github.io/tags/JavaScript/"/>
</entry>
<entry>
<title>探索Angular2--笔记</title>
<link href="http://tingtingli911.github.io/2016/10/14/%E6%8E%A2%E7%B4%A2Angular2%EF%BC%8D%EF%BC%8D%E7%AC%94%E8%AE%B0/"/>
<id>http://tingtingli911.github.io/2016/10/14/探索Angular2--笔记/</id>
<published>2016-10-14T07:25:35.000Z</published>
<updated>2016-12-04T14:12:39.000Z</updated>
<content type="html"><![CDATA[<h3 id="学习笔记"><a href="#学习笔记" class="headerlink" title="学习笔记"></a>学习笔记</h3><ol><li>元数据:告诉Angular如何处理一个类,例如”@Component”装饰器后面的类被视作一个组件,传给装饰器的参数(配置项)就是元数据。它是用来指导Angular的行为的。</li></ol><h3 id="代码规范"><a href="#代码规范" class="headerlink" title="代码规范"></a>代码规范</h3><ol><li>所有service都添加@Injectable()</li></ol><h3 id="实际使用技巧"><a href="#实际使用技巧" class="headerlink" title="实际使用技巧"></a>实际使用技巧</h3><ol><li><p>可选依赖 <code>@Optional()</code></p><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> { Optional } <span class="keyword">from</span> <span class="string">'@angular/core'</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">constructor</span>(@Optional() private logger: Logger) {</span><br><span class="line"> <span class="keyword">if</span> (<span class="keyword">this</span>.logger) {</span><br><span class="line"> <span class="keyword">this</span>.logger.log(some_message);</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>s</p></li></ol>]]></content>
<summary type="html">
<h3 id="学习笔记"><a href="#学习笔记" class="headerlink" title="学习笔记"></a>学习笔记</h3><ol>
<li>元数据:告诉Angular如何处理一个类,例如”@Component”装饰器后面的类被视作一个组件,传给装饰器的
</summary>
<category term="前端开发" scheme="http://tingtingli911.github.io/categories/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/"/>
<category term="Angular2" scheme="http://tingtingli911.github.io/tags/Angular2/"/>
<category term="JavaScript" scheme="http://tingtingli911.github.io/tags/JavaScript/"/>
</entry>
<entry>
<title>Hello World</title>
<link href="http://tingtingli911.github.io/2016/06/22/hello-world/"/>
<id>http://tingtingli911.github.io/2016/06/22/hello-world/</id>
<published>2016-06-22T04:26:59.000Z</published>
<updated>2016-06-22T04:26:59.000Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">Deployment</a></p>]]></content>
<summary type="html">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.
</summary>
</entry>
</feed>