<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5786378124468340243</id><updated>2024-11-01T18:35:29.576+08:00</updated><category term="旅遊"/><category term="New York"/><category term="美食"/><category term="生活"/><category term="發胖文"/><category term="想法"/><category term="作品"/><category term="學生會"/><category term="美國"/><category term="Mac"/><category term="綠圈圈"/><category term="iOS"/><category term="youtube"/><category term="甜品"/><category term="音樂"/><category term="數資"/><category term="Angular"/><category term="ng2"/><category term="ng4"/><category term="抱怨文"/><category term="法式料理"/><category term="Arduino"/><category term="香港"/><category term="G9"/><category term="Houston"/><category term="iPod"/><category term="影片"/><category term="硬體"/><category term="香香"/><category term="Google"/><category term="MacBook Pro"/><category term="web"/><category term="心得"/><category term="教學"/><category term="軟體"/><category term="Motion 3"/><category term="感謝上帝"/><category term="歌手"/><category term="電影"/><category term="Mac mini"/><category term="Raspberry"/><category term="php"/><category term="忠孝復興站"/><category term="我要去冒險"/><category term="美工"/><category term="義大利"/><category term="聚會"/><category term="補教生涯"/><category term="過去"/><category term="AA"/><category term="BMW"/><category term="C#"/><category term="Gmail"/><category term="Java"/><category term="JavaFx"/><category term="MIB"/><category term="Mouse"/><category term="Node.js"/><category term="Reebok"/><category term="Wendy"/><category term="Xcode"/><category term="ZPL"/><category term="Zebra"/><category term="adidas"/><category term="iMovie"/><category term="python"/><category term="sucks"/><category term="國泰"/><category term="國片"/><category term="展覽"/><category term="成績"/><category term="杯子"/><category term="程式"/><category term="籃球"/><category term="網球"/><category term="設計"/><category term="車"/><category term="飛碟"/><title type='text'>開心開一</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>665</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-47199948393040426</id><published>2019-02-01T22:00:00.001+08:00</published><updated>2019-02-01T22:00:15.293+08:00</updated><title type='text'>[React] FIX: Hooks can only be called inside the body of a function component.錯誤</title><content type='html'>Hooks can only be called inside the body of a function component錯誤除了 react 要升級到&amp;nbsp; &amp;nbsp;16.8.0-alpha.1 之外&amp;nbsp; react-dom 也要 16.8.0-alpha.1 以上</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/47199948393040426/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2019/02/react-fix-hooks-can-only-be-called.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/47199948393040426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/47199948393040426'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2019/02/react-fix-hooks-can-only-be-called.html' title='[React] FIX: Hooks can only be called inside the body of a function component.錯誤'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-2701164506273090116</id><published>2018-10-28T17:41:00.002+08:00</published><updated>2018-10-28T17:46:04.529+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Zebra"/><category scheme="http://www.blogger.com/atom/ns#" term="ZPL"/><title type='text'>[ZPL] Zebra 印中文標籤 print  chinese characters </title><content type='html'>&lt;span style=&quot;color: #444444;&quot;&gt;最近在用 Zebra GT800 印標籤(透過 web browser)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;全英文標籤沒什麼問題&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;但中文部分都吐亂碼或問號&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;看了 GT800 裡面有特別內建 CHT.FNT,&amp;nbsp; SIMSUN.FNT&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;起初我一直以為 CHT.FNT 是印繁體中文的字體
&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;SIMSUN.FNT 則是印簡體中文的字體&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;BUT.....&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;CHT.FNT 都吐問號 ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;SIMSUN.FNT 內竟然也有繁體中文....&amp;nbsp; &amp;nbsp;(／‵Д′)／~ ╧╧&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;所以用 SIMSUN.FNT 就通吃中文惹....&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;然後字的部分要轉成 HEX String 然後搭配 ^FH 一起使用&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;假設要印 “繁體中文讚讚讚!”&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;首先將 繁體中文讚讚讚! 貼到 &lt;a href=&quot;https://openopen114.github.io/TextToHexString&quot;&gt;https://openopen114.github.io/TextToHexString&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;https://github.com/openopen114/TextToHexString&quot; target=&quot;_blank&quot;&gt;[Github]&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;點 Gen 後選擇 Hex String For ZPL 可得到&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;_E7_B9_81_E9_AB_94_E4_B8_AD_E6_96_87_E8_AE_9A_E8_AE_9A_E8_AE_9A_21&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1HmXl1O2GMc6W8riBkHz_PSI1qELQccmzasqv7tyHx0SC3HYRGcuY88li5UsI42iyt_Fw6JWW4k3D6cCSxJoTsY8DMsdDS0T4Y9pE9qLDGjOXy_4Dqb90tfdEdCfj2xPXX_Te5V4fIVg/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2018-10-28+%25E4%25B8%258B%25E5%258D%25885.30.16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;370&quot; data-original-width=&quot;753&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1HmXl1O2GMc6W8riBkHz_PSI1qELQccmzasqv7tyHx0SC3HYRGcuY88li5UsI42iyt_Fw6JWW4k3D6cCSxJoTsY8DMsdDS0T4Y9pE9qLDGjOXy_4Dqb90tfdEdCfj2xPXX_Te5V4fIVg/s640/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2018-10-28+%25E4%25B8%258B%25E5%258D%25885.30.16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;然後 ZPL CODE 如下&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;^XA&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;^CI28&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;^A@R,50,50,E:SIMSUN.FNT&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #999999; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;^FO50,50&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;^FH&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;^FD &lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;_E7_B9_81_E9_AB_94_E4_B8_AD_E6_96_87_E8_AE_9A_E8_AE_9A_E8_AE_9A_21 &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;^FS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;^XZ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrYtJiJy2kBmGhyEXB7w4wkyOQAoV0IKvBz_jHpLJWQEhm_XPtyobmFxkUJs0l0_GqH6dbxk_zHd_7efcs_ySciwardVHSfjRLg2MW42hyphenhyphenJ0TjaoOoKXNX8rCiE_FhduPuTmQ5Ae5-syk/s1600/DSC_7540.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrYtJiJy2kBmGhyEXB7w4wkyOQAoV0IKvBz_jHpLJWQEhm_XPtyobmFxkUJs0l0_GqH6dbxk_zHd_7efcs_ySciwardVHSfjRLg2MW42hyphenhyphenJ0TjaoOoKXNX8rCiE_FhduPuTmQ5Ae5-syk/s640/DSC_7540.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;chinese quote&amp;quot; , , , &amp;quot;segoe ui&amp;quot; , &amp;quot;pingfang sc&amp;quot; , &amp;quot;hiragino sans gb&amp;quot; , &amp;quot;microsoft yahei&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/2701164506273090116/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2018/10/zpl-zebra-print-chinese-characters.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2701164506273090116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2701164506273090116'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2018/10/zpl-zebra-print-chinese-characters.html' title='[ZPL] Zebra 印中文標籤 print  chinese characters '/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1HmXl1O2GMc6W8riBkHz_PSI1qELQccmzasqv7tyHx0SC3HYRGcuY88li5UsI42iyt_Fw6JWW4k3D6cCSxJoTsY8DMsdDS0T4Y9pE9qLDGjOXy_4Dqb90tfdEdCfj2xPXX_Te5V4fIVg/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2018-10-28+%25E4%25B8%258B%25E5%258D%25885.30.16.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-4663799938082161183</id><published>2018-06-17T14:15:00.002+08:00</published><updated>2018-06-18T23:17:35.879+08:00</updated><title type='text'>[Angular] ngFor filter</title><content type='html'>&lt;script src=&quot;https://gist.github.com/openopen114/2b1fcf0eb6dd718a3e80d13398dfc718.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/4663799938082161183/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2018/06/angular-ngfor-filter.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/4663799938082161183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/4663799938082161183'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2018/06/angular-ngfor-filter.html' title='[Angular] ngFor filter'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-5531472976238213569</id><published>2018-06-02T13:33:00.002+08:00</published><updated>2018-06-02T13:33:09.060+08:00</updated><title type='text'>解決  electron 安裝失敗問題(Mac)</title><content type='html'>&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;npm install -g electron 出現Error&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); font-size: 11.9px;&quot;&gt;&lt;span style=&quot;color: #24292e; font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;&quot;&gt;permission denied, mkdir &#39;/usr/local/lib/node_modules/electron/dist&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;使用下列安裝就順利裝上去惹＠＠&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: rgba(27, 31, 35, 0.05); color: #24292e; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; font-size: 11.9px;&quot;&gt;sudo npm install -g electron --unsafe-perm=true --allow-root&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/5531472976238213569/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2018/06/electron-mac.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5531472976238213569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5531472976238213569'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2018/06/electron-mac.html' title='解決  electron 安裝失敗問題(Mac)'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-6631160997685639247</id><published>2018-05-08T10:00:00.002+08:00</published><updated>2018-05-08T10:00:48.546+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaFx"/><title type='text'>[JavaFx] *Fix  Failed to start sceneBuild via Intellij Idea for Mac</title><content type='html'>1. download SceneBuild&lt;br /&gt;
link:&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-1x-archive-2199384.html#javafx-scenebuilder-2.0-oth-JPR&quot;&gt;http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-1x-archive-2199384.html#javafx-scenebuilder-2.0-oth-JPR&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Intellij Idea -&amp;gt; Preferences&lt;br /&gt;
&lt;br /&gt;
search &quot;JavaFX&quot;&lt;br /&gt;
&lt;br /&gt;
then setting the path of sceneBuild App&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfV7aUkaQQypLeMlpvqHbqirs-JaZ3pgvP2DI2yxEayEgXOlsg6CmnzsdRaP3ENUzgT93x91jBf_Hy3qlpIQWfznWPE3FF-XAuNoJnT-UyUyY7rzsuhTj4xAxvRXNK0qKlrpWiioKShQA/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2018-05-08+%25E4%25B8%258A%25E5%258D%25889.59.58.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;808&quot; data-original-width=&quot;1142&quot; height=&quot;452&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfV7aUkaQQypLeMlpvqHbqirs-JaZ3pgvP2DI2yxEayEgXOlsg6CmnzsdRaP3ENUzgT93x91jBf_Hy3qlpIQWfznWPE3FF-XAuNoJnT-UyUyY7rzsuhTj4xAxvRXNK0qKlrpWiioKShQA/s640/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2018-05-08+%25E4%25B8%258A%25E5%258D%25889.59.58.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Done!</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/6631160997685639247/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2018/05/javafx-fix-failed-to-start-scenebuild.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6631160997685639247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6631160997685639247'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2018/05/javafx-fix-failed-to-start-scenebuild.html' title='[JavaFx] *Fix  Failed to start sceneBuild via Intellij Idea for Mac'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfV7aUkaQQypLeMlpvqHbqirs-JaZ3pgvP2DI2yxEayEgXOlsg6CmnzsdRaP3ENUzgT93x91jBf_Hy3qlpIQWfznWPE3FF-XAuNoJnT-UyUyY7rzsuhTj4xAxvRXNK0qKlrpWiioKShQA/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2018-05-08+%25E4%25B8%258A%25E5%258D%25889.59.58.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-6471555172094967042</id><published>2018-04-13T22:57:00.002+08:00</published><updated>2018-04-13T22:57:29.659+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>[解決] -bash: dotnet: command not found for Mac</title><content type='html'>裝完官網的 dotnet 要用就出現&lt;br /&gt;





&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;


&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;-bash: dotnet: command not found&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;先用&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-variant-ligatures: no-common-ligatures;&quot;&gt;/usr/local/share/dotnet/dotnet --info&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
看有沒有執行，有的話只是連結問題&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
改用&amp;nbsp;&lt;span style=&quot;font-variant-ligatures: no-common-ligatures;&quot;&gt;ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
就可以惹＠＠&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 15.0px Menlo; color: #000000; background-color: #ffffff}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/6471555172094967042/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2018/04/bash-dotnet-command-not-found-for-mac.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6471555172094967042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6471555172094967042'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2018/04/bash-dotnet-command-not-found-for-mac.html' title='[解決] -bash: dotnet: command not found for Mac'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-2639076017509619168</id><published>2017-11-07T08:39:00.001+08:00</published><updated>2017-11-07T08:39:09.745+08:00</updated><title type='text'>[解決] High Sierra 滑鼠頓 lag 問題 </title><content type='html'>升級到high sierra 後 magic mouse 頓頓der&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
用一般 USB Mouse也一樣&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
後來google到裝usb overdrive就解決了&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
link:&amp;nbsp;&lt;a href=&quot;http://www.usboverdrive.com/USBOverdrive/News.html&quot;&gt;http://www.usboverdrive.com/USBOverdrive/News.html&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/2639076017509619168/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/11/high-sierra-lag.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2639076017509619168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2639076017509619168'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/11/high-sierra-lag.html' title='[解決] High Sierra 滑鼠頓 lag 問題 '/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-6685160632102637869</id><published>2017-07-12T16:25:00.003+08:00</published><updated>2017-07-12T16:25:39.851+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>[Node.js] express: command not found [解決辦法]</title><content type='html'>sudo npm install -g express-generator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
這樣就可以在terminal express projectName惹 0.0</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/6685160632102637869/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/07/nodejs-express-command-not-found.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6685160632102637869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6685160632102637869'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/07/nodejs-express-command-not-found.html' title='[Node.js] express: command not found [解決辦法]'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-7674150555938696990</id><published>2017-06-21T08:54:00.003+08:00</published><updated>2017-06-21T08:54:30.932+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4] 好用的scroll to </title><content type='html'>&lt;br /&gt;&lt;a href=&quot;https://www.npmjs.com/package/ng2-scroll-to&quot; target=&quot;_blank&quot;&gt;https://www.npmjs.com/package/ng2-scroll-to&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
直接 npm 安裝&lt;br /&gt;
&lt;br /&gt;
加上&amp;nbsp;&lt;span style=&quot;background-color: #f0f0f0; color: #4d4d4d; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-size: 16px; white-space: pre;&quot;&gt;scrollTo 就可以用了&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #f0f0f0; color: #4d4d4d; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-size: 16px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #4d4d4d; font-family: Courier New, monospace;&quot;&gt;&lt;span style=&quot;background-color: #f0f0f0; white-space: pre;&quot;&gt;單純記錄0.0&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/7674150555938696990/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/06/angular-4-scroll-to.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/7674150555938696990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/7674150555938696990'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/06/angular-4-scroll-to.html' title='[Angular 4] 好用的scroll to '/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-2126094679838211731</id><published>2017-05-11T08:07:00.003+08:00</published><updated>2017-05-11T08:08:06.081+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4] sideNav via materialize</title><content type='html'>&lt;script src=&quot;https://gist.github.com/openopen114/900b16b984b517403955ee24824a2822.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/2126094679838211731/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-sidenav-via-materialize.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2126094679838211731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2126094679838211731'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-sidenav-via-materialize.html' title='[Angular 4] sideNav via materialize'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-5143985756301422625</id><published>2017-05-10T14:53:00.000+08:00</published><updated>2017-05-10T14:53:04.018+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4] http</title><content type='html'>&lt;script src=&quot;https://gist.github.com/openopen114/96383ac2e47e8883af129a76fae7e47d.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/5143985756301422625/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-http.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5143985756301422625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5143985756301422625'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-http.html' title='[Angular 4] http'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-2186941133546321799</id><published>2017-05-09T17:18:00.002+08:00</published><updated>2017-05-09T17:18:57.666+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4] service</title><content type='html'>&lt;script src=&quot;https://gist.github.com/openopen114/9ea9379304fb569671bce3ed74b2542e.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/2186941133546321799/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-service.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2186941133546321799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2186941133546321799'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-service.html' title='[Angular 4] service'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-559679576750030898</id><published>2017-05-05T14:08:00.001+08:00</published><updated>2017-05-11T08:08:19.631+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4]  Form</title><content type='html'>1.via ReactiveFormModele
&lt;script src=&quot;https://gist.github.com/openopen114/738faf648ee68d84a93b8bd71daf750c.js&quot;&gt;&lt;/script&gt;




2.via FormModele
&lt;script src=&quot;https://gist.github.com/openopen114/6952c6a23137fbb50c39581f62758d9d.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/559679576750030898/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-form.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/559679576750030898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/559679576750030898'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-form.html' title='[Angular 4]  Form'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-3807693205585588203</id><published>2017-05-05T13:14:00.003+08:00</published><updated>2017-05-05T13:15:10.436+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4] Todo List</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5zdureItGt9INBYlDXMzPQZHjoOcWvVUia9GPtgKyZKFrRQ0pwFwFqnEBxZ5INZCG5keYYt9a3MWrqcKtzOnNkh0fVg76R6GJaXbWBztgqy1oFuhgyBk7C2D62JhCbqyJdgw4m6vwx-A/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2017-05-05+%25E4%25B8%258B%25E5%258D%25881.09.02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5zdureItGt9INBYlDXMzPQZHjoOcWvVUia9GPtgKyZKFrRQ0pwFwFqnEBxZ5INZCG5keYYt9a3MWrqcKtzOnNkh0fVg76R6GJaXbWBztgqy1oFuhgyBk7C2D62JhCbqyJdgw4m6vwx-A/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2017-05-05+%25E4%25B8%258B%25E5%258D%25881.09.02.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/openopen114/2df4c47e794df4fc471d32f5a0476e6c.js&quot;&gt;&lt;/script&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/3807693205585588203/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-todo-list.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/3807693205585588203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/3807693205585588203'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-todo-list.html' title='[Angular 4] Todo List'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5zdureItGt9INBYlDXMzPQZHjoOcWvVUia9GPtgKyZKFrRQ0pwFwFqnEBxZ5INZCG5keYYt9a3MWrqcKtzOnNkh0fVg76R6GJaXbWBztgqy1oFuhgyBk7C2D62JhCbqyJdgw4m6vwx-A/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2017-05-05+%25E4%25B8%258B%25E5%258D%25881.09.02.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-2667565162797672723</id><published>2017-05-05T09:08:00.003+08:00</published><updated>2017-05-05T09:09:35.663+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="ng4"/><title type='text'>[Angular 4] Router 用法</title><content type='html'>&lt;script src=&quot;https://gist.github.com/openopen114/7944158d2069c12788499194a216ed95.js&quot;&gt;&lt;/script&gt;

1.在app.module.ts import routermodule&lt;br /&gt;
&lt;br /&gt;
2.設定forRoot path and component&lt;br /&gt;
&lt;br /&gt;
3.在html部分 tag a 裡面使用routerLink去辨識，然後內容會顯示在router-outlet
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/2667565162797672723/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-router.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2667565162797672723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/2667565162797672723'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/05/angular-4-router.html' title='[Angular 4] Router 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-5950708358749212977</id><published>2017-04-07T16:50:00.003+08:00</published><updated>2017-04-07T16:52:19.636+08:00</updated><title type='text'>[Apache] 固定ip架設網站設定 in Ubuntu </title><content type='html'>最近在改寫公司網站&lt;br /&gt;
&lt;br /&gt;
順便把部署環境從windows改成Ubuntu&lt;br /&gt;
&lt;br /&gt;
恩...就不愛微軟跟Asp....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ubuntu上安裝LAMP可以google有很多教學&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
或是可以參考這篇&lt;a href=&quot;https://www.peterdavehello.org/2016/03/lamp-linux-apache-mysql-php-web-server-fast-setup-essential/&quot; target=&quot;_blank&quot;&gt;「LAMP Web Server 網頁伺服器快速建置入門」&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
因為公司有固定ip，Ubuntu上設定ip也不困難&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
然後在 /etc/apache2/ 下有 ports.conf&lt;br /&gt;
&lt;br /&gt;
可以設定要從哪個port進來&lt;br /&gt;
&lt;br /&gt;
像是 &amp;nbsp;Listen 90 的話就是從 90 port 進來&lt;br /&gt;
&lt;br /&gt;
要設定給固定ip的話可以設定&lt;br /&gt;
&lt;br /&gt;
Listen *:80&lt;br /&gt;
Listen xxx.xxx.xxx.xxx:80&lt;br /&gt;
&lt;br /&gt;
其他不用改就可以了(假設 DNS 服務代管已經有設了o.0)&lt;br /&gt;
&lt;br /&gt;
然後重啟apache&lt;br /&gt;
&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
這樣就搞定了&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR9It2eXV82jVGxBp38XVy-Hhr6zePnlw5QANXSD27qDdOu9V4Lsvlb4AmElV-gjeZ5nWVD_kblavLWm9LKzKzVdiQlFlappzfVHEwCEDHFWSdhb59W1S4Q-BnaPmr055tO6nwSBM4pDg/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2017-04-07+%25E4%25B8%258B%25E5%258D%25884.48.50.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR9It2eXV82jVGxBp38XVy-Hhr6zePnlw5QANXSD27qDdOu9V4Lsvlb4AmElV-gjeZ5nWVD_kblavLWm9LKzKzVdiQlFlappzfVHEwCEDHFWSdhb59W1S4Q-BnaPmr055tO6nwSBM4pDg/s400/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2017-04-07+%25E4%25B8%258B%25E5%258D%25884.48.50.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/5950708358749212977/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2017/04/apache-ip-in-ubuntu.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5950708358749212977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5950708358749212977'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2017/04/apache-ip-in-ubuntu.html' title='[Apache] 固定ip架設網站設定 in Ubuntu '/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR9It2eXV82jVGxBp38XVy-Hhr6zePnlw5QANXSD27qDdOu9V4Lsvlb4AmElV-gjeZ5nWVD_kblavLWm9LKzKzVdiQlFlappzfVHEwCEDHFWSdhb59W1S4Q-BnaPmr055tO6nwSBM4pDg/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2017-04-07+%25E4%25B8%258B%25E5%258D%25884.48.50.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-6931584151252177349</id><published>2016-12-22T17:16:00.001+08:00</published><updated>2016-12-22T19:55:23.946+08:00</updated><title type='text'>[Angular2] Angular 2 Host in Apache Server</title><content type='html'>&lt;br /&gt;
一般都用Angular CLI的 ng server去host&lt;br /&gt;
&lt;br /&gt;
但突然想要用 Apache&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. ng new YourProj&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. &amp;nbsp;set build/output directory(option)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;// in angular-cli.json&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;// outDir 可以設定build/output的資料夾，預設是dist&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&quot;apps&quot;: [&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;root&quot;: &quot;src&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;outDir&quot;: &quot;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;dist&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot;, &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;assets&quot;: [&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;assets&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;favicon.ico&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;index&quot;: &quot;index.html&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;main&quot;: &quot;main.ts&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;test&quot;: &quot;test.ts&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;tsconfig&quot;: &quot;tsconfig.json&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;prefix&quot;: &quot;app&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;mobile&quot;: false,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;styles&quot;: [&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;styles.css&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;scripts&quot;: [],&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;environments&quot;: {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;source&quot;: &quot;environments/environment.ts&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;dev&quot;: &quot;environments/environment.ts&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;prod&quot;: &quot;environments/environment.prod.ts&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; ],&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;3.use relative path&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;// in index.html&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;&lt;base href=&quot;/&quot;&gt;&lt;/base&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;base href=&quot;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot; &amp;nbsp;-&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;base href=&quot;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;./&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;base href=&quot;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;./&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;!-- relative path --&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;4.ng build --prod&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;bulid完就會出現dist資料夾&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;然後把dist資料夾移到apache的路徑下就ok了&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/wA-MfYWLLhg&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;

</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/6931584151252177349/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular-angular-2-host-in-apache-server.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6931584151252177349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6931584151252177349'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular-angular-2-host-in-apache-server.html' title='[Angular2] Angular 2 Host in Apache Server'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wA-MfYWLLhg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-8812969615277856539</id><published>2016-12-22T10:32:00.001+08:00</published><updated>2016-12-22T10:32:20.057+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Anguler2] routing 用法</title><content type='html'>youtube影片可以參考：&lt;a href=&quot;https://youtu.be/Uvj_7ZMrHmg&quot;&gt;https://youtu.be/Uvj_7ZMrHmg&lt;/a&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFaE7WnX2SQ2Z7sdsrSfeBkEG5kBTldv7JpDi7nvYnr1gkJhvM6AHKTYknpJSWmw1jm51uHlCJ8QY867AlCHfa9C3yuwurKE5YG8Sf2OybWlJ6ZqdF8Ef0GqenDMpPcmFJJBpUPawWihA/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-22+%25E4%25B8%258A%25E5%258D%258810.24.14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFaE7WnX2SQ2Z7sdsrSfeBkEG5kBTldv7JpDi7nvYnr1gkJhvM6AHKTYknpJSWmw1jm51uHlCJ8QY867AlCHfa9C3yuwurKE5YG8Sf2OybWlJ6ZqdF8Ef0GqenDMpPcmFJJBpUPawWihA/s320/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-22+%25E4%25B8%258A%25E5%258D%258810.24.14.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;1.新增 app.router.ts&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import { ModuleWithProviders } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import { RouterModule, Routes } from &#39;@angular/router&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import { AppComponent } from &#39;./app.component&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import { AboutComponent } from &#39;./about/about.component&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import { ServicesComponent } from &#39;./services/services.component&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;// setting router path&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;export const router: Routes = [&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{path: &#39;&#39;, redirectTo: &#39;services&#39;, pathMatch: &#39;full&#39; }, &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;//redirect to service&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{path: &#39;about&#39;, component: AboutComponent },&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{path: &#39;services&#39;, component: ServicesComponent },&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;// generate router module&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;export const routes: ModuleWithProviders = RouterModule.forRoot(router);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;2.app.module.ts 要import routes&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { BrowserModule } from &#39;@angular/platform-browser&#39;;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { NgModule } from &#39;@angular/core&#39;;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { FormsModule } from &#39;@angular/forms&#39;;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { HttpModule } from &#39;@angular/http&#39;;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import {&lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;routes&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;} from &#39;./app.router&#39;; //import&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { AppComponent } from &#39;./app.component&#39;;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { AboutComponent } from &#39;./about/about.component&#39;;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
import { ServicesComponent } from &#39;./services/services.component&#39;;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
@NgModule({&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; declarations: [&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; &amp;nbsp; AppComponent,&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; &amp;nbsp; AboutComponent,&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; &amp;nbsp; ServicesComponent&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; ],&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; imports: [&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; &amp;nbsp; BrowserModule,&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; &amp;nbsp; FormsModule,&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; &amp;nbsp; HttpModule,&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;routes&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt; //import&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; ],&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; providers: [],&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&amp;nbsp; bootstrap: [AppComponent]&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
})&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
export class AppModule { }&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;3.app.component.html 設定routerLink &amp;amp; router-outlet&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;//router-outlet就是所對應的component表現的地方&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a font=&quot;&quot; href=&quot;https://www.blogger.com/null&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;routerLink&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;=&quot;about&quot;&amp;gt;About&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;
&lt;li&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;https://www.blogger.com/null&quot; routerlink=&quot;services&quot;&gt;Services&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp;&lt;div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;div class=&quot;container&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #3d85c6; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;router-outlet&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;/router-outlet&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #3d85c6;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/8812969615277856539/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/anguler2-routing.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/8812969615277856539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/8812969615277856539'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/anguler2-routing.html' title='[Anguler2] routing 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFaE7WnX2SQ2Z7sdsrSfeBkEG5kBTldv7JpDi7nvYnr1gkJhvM6AHKTYknpJSWmw1jm51uHlCJ8QY867AlCHfa9C3yuwurKE5YG8Sf2OybWlJ6ZqdF8Ef0GqenDMpPcmFJJBpUPawWihA/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-22+%25E4%25B8%258A%25E5%258D%258810.24.14.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-8898476045869360044</id><published>2016-12-09T09:10:00.003+08:00</published><updated>2016-12-09T09:10:33.191+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Angular2] service with Http Error Catch 用法</title><content type='html'>當http 抓不到資料時拋出錯誤&lt;br /&gt;
&lt;a href=&quot;https://github.com/openopen114/ng2/tree/master/employee_list&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;1. import&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* employee.service.ts */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Injectable } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;Http, Headers, Response&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt; } from &#39;@angular/http&#39;; //import Http, Headers , Response&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import {&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;Observable&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;} from &#39;rxjs/Observable&#39;; &amp;nbsp;//import Observable&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import &#39;rxjs/add/operator/&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&#39;; //import rxjs map&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import &#39;rxjs/add/operator/&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&#39;; //import rxjs catch&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import &#39;rxjs/add/Observable/&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Injectable()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class EmployeeService {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; private _url: string = &quot;../apidata/employeeData.json&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; constructor(private _http: Http) {}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; getEmployees(){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return this._http.get(this._url)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .map(res =&amp;gt; res.json())&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;(this._errorHandler); &amp;nbsp;// catch error handler&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;_errorHandler&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;(err: Response){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.error(err);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return Observable.throw(err || &quot;Server Error&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;2.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* employee-list.component.ts */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;-------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { EmployeeService } from &#39;../employee.service&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-employee-list&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./employee-list.component.html&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./employee-list.component.css&#39;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class EmployeeListComponent implements OnInit {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; employees = [];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; errorMsg: string;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; constructor(private _empService: EmployeeService) { }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; ngOnInit() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // this.employees = this._empService.getEmployees();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._empService.getEmployees()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;subscribe&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;(resEmpData =&amp;gt; this.employees = resEmpData,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;resEmpError =&amp;gt; this.errorMsg = resEmpError);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/8898476045869360044/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-service-with-http-error-catch.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/8898476045869360044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/8898476045869360044'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-service-with-http-error-catch.html' title='[Angular2] service with Http Error Catch 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-6559835484954529716</id><published>2016-12-08T16:04:00.000+08:00</published><updated>2016-12-08T16:04:12.872+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Angular2] service via Http Rxjs 用法</title><content type='html'>在 service 用http 去要資料(json)&lt;br /&gt;
&lt;br /&gt;
然後給component 用&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. get data via Http&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* employee.service.ts*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Injectable } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;Http, Headers&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt; } from &#39;@angular/http&#39;; &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//import Http, Headers&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&#39;rxjs/add/operator/map&#39;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//import rxjs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Injectable()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class EmployeeService {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; private &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;_url&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;: string = &quot;../apidata/employeeData.json&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; constructor(&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;private _http: Http&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;) {}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; getEmployees(){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;this._http.get(this._url)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #e06666;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;(res =&amp;gt; res.json())&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;2.subscribe&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* employee-list.component.ts*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;-----------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;EmployeeService&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt; } from &#39;../employee.service&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-employee-list&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./employee-list.component.html&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./employee-list.component.css&#39;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class EmployeeListComponent implements OnInit {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; employees = [];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; constructor(&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;private _empService: EmployeeService&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;) { }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; ngOnInit() {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;this._empService.getEmployees()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #e06666;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;subscribe&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;(resEmpData =&amp;gt; this.employees = resEmpData)&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/6559835484954529716/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-service-via-http-rxjs.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6559835484954529716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/6559835484954529716'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-service-via-http-rxjs.html' title='[Angular2] service via Http Rxjs 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-8434631297938472316</id><published>2016-12-08T15:20:00.003+08:00</published><updated>2016-12-08T15:21:01.698+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Angular2] Output 用法</title><content type='html'>從inside component 發送一個值到App component&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.import EventEmitter, Output&lt;br /&gt;
&lt;span style=&quot;color: #e06666;&quot;&gt;&amp;nbsp; &amp;nbsp;emitSpot&lt;/span&gt; 就像是發射台，將東西發射出去&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* inside.component.ts */&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component, OnInit, &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;EventEmitter, Output &lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;} from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-inside&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./inside.component.html&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./inside.component.css&#39;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class InsideComponent implements OnInit {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;@Output()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #e06666;&quot;&gt;&amp;nbsp; emitSpot = new EventEmitter;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt; sendTextToAppComp(val: string)&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;outputText2App func working&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(val);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;this.emitSpot.emit(val)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; constructor() { }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; ngOnInit() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. html 就簡單按 click button 後呼叫&lt;span style=&quot;color: #e06666;&quot;&gt;sendTextToAppComp()&lt;/span&gt;將 input value 送到App Comp&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* inside.component.html */&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;input insideinput=&quot;&quot; type=&quot;text&quot; value=&quot;0123456789&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;button click=&quot;&quot; font=&quot;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;sendTextToAppComp(insideInput.value)&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot;&amp;gt; send text to AppComp&lt;/span&gt;&lt;/button&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;3.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* app.component.html */&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
&lt;/span&gt;&lt;/h1&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; {{title}}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
{{AppText}}&lt;/span&gt;&lt;/h1&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;app-inside font=&quot;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;emitSpot&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;)=&quot;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;OutputTextFromInsideComp($event)&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;/app-inside&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;4.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* app.component.ts */&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-root&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./app.component.html&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./app.component.css&#39;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class AppComponent {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; title = &#39;app works!&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; public AppText = &#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;OutputTextFromInsideComp($event)&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;OutputTextFromInsideComp Working&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&quot;event: :&quot;+$event);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;this.AppText = $event;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;流程大概就是&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;sendTextToAppComp() -&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;emitSpot.emit(val) -&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;emitSpot&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;) -&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;OutputTextFromInsideComp($event) -&amp;gt; t&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;his.AppText = $event;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeCnYSOfgH3ZqLnQuqG_Qu1nkC7hMmdlgoTUa_5lBJzDp1SB0ANfdBaAXbr5LGAcsBIuD9eNSqHRZQqDB5e6JWJkPXuK0o1OO3fianTGIbfGy747lr_4MHWt4oWB3qLI8_dx0mCN6Y5uk/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258B%25E5%258D%25883.09.02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeCnYSOfgH3ZqLnQuqG_Qu1nkC7hMmdlgoTUa_5lBJzDp1SB0ANfdBaAXbr5LGAcsBIuD9eNSqHRZQqDB5e6JWJkPXuK0o1OO3fianTGIbfGy747lr_4MHWt4oWB3qLI8_dx0mCN6Y5uk/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258B%25E5%258D%25883.09.02.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/8434631297938472316/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-output.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/8434631297938472316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/8434631297938472316'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-output.html' title='[Angular2] Output 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeCnYSOfgH3ZqLnQuqG_Qu1nkC7hMmdlgoTUa_5lBJzDp1SB0ANfdBaAXbr5LGAcsBIuD9eNSqHRZQqDB5e6JWJkPXuK0o1OO3fianTGIbfGy747lr_4MHWt4oWB3qLI8_dx0mCN6Y5uk/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258B%25E5%258D%25883.09.02.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-5790106949779292484</id><published>2016-12-08T14:26:00.001+08:00</published><updated>2016-12-08T15:21:09.659+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Angular2] Input 用法</title><content type='html'>將 App component 的值 input 到 inside component 用&lt;br /&gt;
&lt;br /&gt;
也就是 inside comp 需要吃一個值 從 App comp&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/openopen114/ng2/tree/master/inpustTest&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. import input, 設定input 的變數&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* inside.component.ts*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component, OnInit ,&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;Input&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;} from &#39;@angular/core&#39;; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt; //import Inpu&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;t&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-inside&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./inside.component.html&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./inside.component.css&#39;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class InsideComponent implements OnInit {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;@Input()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #e06666;&quot;&gt;&amp;nbsp; public inputTextFromAppComp=&#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; constructor() { }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; ngOnInit() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;2. &amp;nbsp;html 部分就簡單直接print&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* inside.component.html*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;input text from AppComp: &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;h1&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
{{&lt;/span&gt;&lt;/h1&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;inputTextFromAppComp&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;}}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;3.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* app.component.ts*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-root&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./app.component.html&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./app.component.css&#39;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class AppComponent {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; title = &#39;app works!&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;public appText = &quot;string in app comp &quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;4.在App comp的&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;appText &lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;傳給&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;在inside Comp &lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;的&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;inputTextFromAppComp&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #e06666;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* app.component.html*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;app-inside font=&quot;&quot;&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;inputTextFromAppComp&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;]=&quot;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;appText&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&quot; &amp;gt;&lt;/span&gt;&lt;/app-inside&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJmRNcRDdZvPSmYb_vND8wWskSjpWIlQtgHugTG_DqEaOAHc4fUwa9SD3nqkehV27ddPamjoOAuRlT1vTA-yGru2tJfV341TjOAMC4R-l2SbE5gdum_nxq7qae9v-QMIrk2vc5IfWozGc/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258B%25E5%258D%25882.26.20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;177&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJmRNcRDdZvPSmYb_vND8wWskSjpWIlQtgHugTG_DqEaOAHc4fUwa9SD3nqkehV27ddPamjoOAuRlT1vTA-yGru2tJfV341TjOAMC4R-l2SbE5gdum_nxq7qae9v-QMIrk2vc5IfWozGc/s320/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258B%25E5%258D%25882.26.20.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/5790106949779292484/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-input.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5790106949779292484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/5790106949779292484'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-input.html' title='[Angular2] Input 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJmRNcRDdZvPSmYb_vND8wWskSjpWIlQtgHugTG_DqEaOAHc4fUwa9SD3nqkehV27ddPamjoOAuRlT1vTA-yGru2tJfV341TjOAMC4R-l2SbE5gdum_nxq7qae9v-QMIrk2vc5IfWozGc/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258B%25E5%258D%25882.26.20.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-1854477970510822430</id><published>2016-12-08T13:21:00.003+08:00</published><updated>2016-12-08T15:21:21.199+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Angular2] service 用法</title><content type='html'>1.先用 &quot;&lt;span style=&quot;color: #6aa84f;&quot;&gt;ng g service EmployeeService&lt;/span&gt;&quot; &amp;nbsp;create service&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;create src/app/employee-service.service.spec.ts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;create src/app/employee-service.service.ts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;2. 在service裡面寫&amp;nbsp;getEmployees() function&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* employee-service.service.ts*/&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Injectable } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Injectable()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class EmployeeService {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; employessData = [&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&quot;id&quot;:1, &quot;name&quot;:&quot;name_1&quot;, &quot;age&quot;:11},&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&quot;id&quot;:2, &quot;name&quot;:&quot;name_2&quot;, &quot;age&quot;:12},&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&quot;id&quot;:3, &quot;name&quot;:&quot;name_3&quot;, &quot;age&quot;:13}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; ];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;getEmployees() in service&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; getEmployees(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return this.employessData;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; constructor() { }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;3. import service&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;/* app.component.ts*/&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { EmployeeService } from &quot;./employee.service&quot; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//import service&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;@Component({&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; selector: &#39;app-root&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; templateUrl: &#39;./app.component.html&#39;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; styleUrls: [&#39;./app.component.css&#39;],&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; providers: [EmployeeService] &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;// add providers&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;export class AppComponent {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; title = &#39;app works!&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;/* employee-list.component.ts*/&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;import { Component, OnInit } from &#39;@angular/core&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;
&lt;div&gt;
import { EmployeeService } from &#39;../employee.service&#39;;&amp;nbsp;&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//import service&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
@Component({&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&amp;nbsp; selector: &#39;app-employee-list&#39;,&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&amp;nbsp; templateUrl: &#39;./employee-list.component.html&#39;,&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&amp;nbsp; styleUrls: [&#39;./employee-list.component.css&#39;]&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
})&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
export class EmployeeListComponent implements OnInit {&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&amp;nbsp; &amp;nbsp; employees = [];&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; constructor(&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;private _empService: EmployeeService&lt;/span&gt;&lt;span style=&quot;color: #45818e;&quot;&gt;) { }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&amp;nbsp; &amp;nbsp; ngOnInit() {&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt; this.employees = this._empService.getEmployees();&lt;/span&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//get data via emp service&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;/* employee-list.component.html*/&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: black;&quot;&gt;
&lt;span style=&quot;color: #45818e;&quot;&gt;----------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #45818e;&quot;&gt;
&lt;div&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;!--
&lt;li *ngFor=&quot;let item of employees; let i = index&quot;&gt;...&lt;/li&gt;
--&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
&lt;br /&gt;
&lt;li ngfor=&quot;let item of employees&quot;&gt;{{item.name}}&lt;/li&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
result:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUoCONfCW7trP0pR3n6T1sJNrHKh40Ok6G5n_rijY1T0t4kCHUmakI6HWj7oE5DzjItMI1EJQaDtv5KkjvqTvdRH9FVC7SMlMMZ5o50rZC-lX-gsDMKIdRvQk-PE9WHjGYvOEk25bMcxM/s1600/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258A%25E5%258D%258811.13.57.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUoCONfCW7trP0pR3n6T1sJNrHKh40Ok6G5n_rijY1T0t4kCHUmakI6HWj7oE5DzjItMI1EJQaDtv5KkjvqTvdRH9FVC7SMlMMZ5o50rZC-lX-gsDMKIdRvQk-PE9WHjGYvOEk25bMcxM/s320/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258A%25E5%258D%258811.13.57.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #999999;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/1854477970510822430/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-service.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/1854477970510822430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/1854477970510822430'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/12/angular2-service.html' title='[Angular2] service 用法'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUoCONfCW7trP0pR3n6T1sJNrHKh40Ok6G5n_rijY1T0t4kCHUmakI6HWj7oE5DzjItMI1EJQaDtv5KkjvqTvdRH9FVC7SMlMMZ5o50rZC-lX-gsDMKIdRvQk-PE9WHjGYvOEk25bMcxM/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2016-12-08+%25E4%25B8%258A%25E5%258D%258811.13.57.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-7753957442187181163</id><published>2016-11-28T15:01:00.002+08:00</published><updated>2016-12-08T15:21:28.955+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ng2"/><title type='text'>[Angular2]  npm install 錯誤 Error: Cannot find module &#39;minimatch&#39; 解法 (Mac)</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
解法可參考&lt;a href=&quot;https://github.com/npm/npm/issues/10434&quot; target=&quot;_blank&quot;&gt;https://github.com/npm/npm/issues/10434&lt;/a&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;Keyamoon的回覆&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px;&quot;&gt;基本上就是把&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-weight: 600;&quot;&gt;/usr/local/lib/node_modules/npm 整個資料夾刪除&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-weight: 600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-weight: 600;&quot;&gt;然後再去&lt;a href=&quot;https://nodejs.org/en/download/&quot; target=&quot;_blank&quot;&gt;https://nodejs.org/en/download/&lt;/a&gt;&amp;nbsp;下載重新安裝一次 Node.js&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-weight: 600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; font-weight: 600;&quot;&gt;就可以順利npm install Angular 2 package&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-weight: 600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-weight: 600;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/7753957442187181163/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/11/angular2-npm-install-error-cannot-find.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/7753957442187181163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/7753957442187181163'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/11/angular2-npm-install-error-cannot-find.html' title='[Angular2]  npm install 錯誤 Error: Cannot find module &#39;minimatch&#39; 解法 (Mac)'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5786378124468340243.post-4005021912658323359</id><published>2016-11-17T16:08:00.001+08:00</published><updated>2016-11-17T16:08:11.731+08:00</updated><title type='text'>install Samba in Ubuntu</title><content type='html'>&lt;div&gt;
#安裝samba&lt;/div&gt;
sudo apt-get install samba&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#修改 samba 設定&lt;/div&gt;
&lt;div&gt;
sudo vim /etc/samba/smb.conf&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#在smb.conf 最後加&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;[pi]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; comment=pi&#39;s home&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; path=/home&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; read only=no&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; guest ok=no&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; browseable=yes&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; create mask=0755&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #999999;&quot;&gt;&amp;nbsp; directory mask=0755&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#重啟服務&lt;/div&gt;
&lt;div&gt;
sudo service smbd restart&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
#設定帳號密碼&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
sudo smbpasswd -a pi&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
smb://xxx.xxx.xxx.xxx&lt;br /&gt;
就可以進去囉&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openopenblog.blogspot.com/feeds/4005021912658323359/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://openopenblog.blogspot.com/2016/11/install-samba-in-ubuntu.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/4005021912658323359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5786378124468340243/posts/default/4005021912658323359'/><link rel='alternate' type='text/html' href='http://openopenblog.blogspot.com/2016/11/install-samba-in-ubuntu.html' title='install Samba in Ubuntu'/><author><name>openopen</name><uri>http://www.blogger.com/profile/00780188775984156259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizsAJwNOd520x-mrhkeX82yZmpPqdCssbXvcqcrQ6C3brDItALfXllsdf1UztTroHLf2rdN4zeEFPtYZNFiemerDa5yvN3ufjNmabW6jHHocQgQR9CmFj5JrAA4cjm4g/s220/IMG_1671+%E6%8B%B7%E8%B2%9D.JPG'/></author><thr:total>0</thr:total></entry></feed>