You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,9 @@ <h2>
112
112
<li>
113
113
<ahref="https://github.com/mgechev/angularjs-in-patterns/blob/master/i18n/README-fr-fr.md">French Translation</a> by <ahref="https://github.com/manekinekko">manekinekko</a>
114
114
</li>
115
+
<li>
116
+
<ahref="https://github.com/mgechev/angularjs-in-patterns/blob/master/i18n/README-zh-cn.md">Chinese Translation</a> by <ahref="https://github.com/carlosliu">carlosliu</a>
<divclass="highlight highlight-source-js"><pre><spanclass="pl-k">var</span> User <spanclass="pl-k">=</span> $resource(<spanclass="pl-s"><spanclass="pl-pds">'</span>/users/:id<spanclass="pl-pds">'</span></span>),
602
605
user <spanclass="pl-k">=</span> User.get({ id<spanclass="pl-k">:</span><spanclass="pl-c1">42</span> });
<p><code>console.log</code> would outputs an empty object. Since the AJAX request, which happens behind the scene, when <code>User.get</code> is invoked, is asynchronous, we don't have the actual user when <code>console.log</code> is called. Just after <code>User.get</code> makes the GET request it returns an empty object and keeps reference to it. We can think of this object as virtual proxy (a simple placeholder), which would be populated with the actual data once the client receives response by the server.</p>
<spanclass="pl-en">console</span><spanclass="pl-c1">.log</span>(<spanclass="pl-s"><spanclass="pl-pds">'</span>now i know<spanclass="pl-pds">'</span></span>);
1199
+
<spanclass="pl-en">console</span>.<spanclass="pl-c1">log</span>(<spanclass="pl-s"><spanclass="pl-pds">'</span>now i know<spanclass="pl-pds">'</span></span>);
<spanclass="pl-en">console</span><spanclass="pl-c1">.log</span>(<spanclass="pl-s"><spanclass="pl-pds">'</span>now i know<spanclass="pl-pds">'</span></span>);
1220
+
<spanclass="pl-en">console</span>.<spanclass="pl-c1">log</span>(<spanclass="pl-s"><spanclass="pl-pds">'</span>now i know<spanclass="pl-pds">'</span></span>);
0 commit comments