@@ -158,14 +158,14 @@ line with a line of code that opens a {+realm+} and assigns it to the ``realm``
158
158
property. It will look like this:
159
159
160
160
.. literalinclude:: /tutorial/generated/code/final/index.codeblock.openRealm.js
161
- :emphasize-lines: 9
161
+ :language: javascript
162
162
163
163
Now that you have implemented the ``openRealm`` function, you will now need to
164
164
complete the code that retrieves the {+realm+}. In ``index.js``, find the
165
165
``getRealm`` function. It will look like this:
166
166
167
167
.. literalinclude:: /tutorial/generated/code/final/index.codeblock.getRealm.js
168
- :emphasize-lines: 3
168
+ :language: javascript
169
169
170
170
At this point, your app is pointing to your backend and opens a connection
171
171
to it when you start the app. However, users cannot log in yet, so let's update
@@ -184,7 +184,7 @@ Find the the ``logIn`` function and add the following code to create a
184
184
``emailPassword`` credential and call the ``logIn()`` method.
185
185
186
186
.. literalinclude:: /tutorial/generated/code/final/users.codeblock.userLogin.js
187
- :emphasize-lines: 17, 18, 19, 22
187
+ :language: javascript
188
188
189
189
E. Implement the CRUD methods
190
190
-----------------------------
@@ -204,7 +204,7 @@ In ``tasks.js``:
204
204
and pass in the name of the collection:
205
205
206
206
.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.getTasks.js
207
- :emphasize-lines: 3
207
+ :language: javascript
208
208
209
209
210
210
* ``getTask``
@@ -214,7 +214,7 @@ In ``tasks.js``:
214
214
function to get a task by its Id.
215
215
216
216
.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.getTask.js
217
- :emphasize-lines: 11
217
+ :language: javascript
218
218
219
219
220
220
* ``createTask``
@@ -227,8 +227,7 @@ In ``tasks.js``:
227
227
required properties:
228
228
229
229
.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.createTask.js
230
- :emphasize-lines: 23, 24, 25, 26, 27, 28
231
-
230
+ :language: javascript
232
231
233
232
.. note::
234
233
@@ -247,7 +246,7 @@ In ``tasks.js``:
247
246
to delete and then the :js-sdk:`delete() <Realm.html#delete>` function on that task:
248
247
249
248
.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.deleteTask.js
250
- :emphasize-lines: 18, 20
249
+ :language: javascript
251
250
252
251
253
252
* ``modifyTask``
@@ -259,7 +258,7 @@ In ``tasks.js``:
259
258
and Sync ensures the object is updated on the server.
260
259
261
260
.. literalinclude:: /tutorial/generated/code/final/tasks.codeblock.modifyTask.js
262
- :emphasize-lines: 6, 7
261
+ :language: javascript
263
262
264
263
265
264
.. note::
@@ -275,7 +274,7 @@ In ``projects.js``:
275
274
method to get the current user and then access the current user's ``memberOf`` property.
276
275
277
276
.. literalinclude:: /tutorial/generated/code/final/projects.codeblock.getProjects.js
278
- :emphasize-lines: 4, 5
277
+ :language: javascript
279
278
280
279
F. Use Realm Functions
281
280
----------------------
@@ -291,7 +290,7 @@ implement the calls to {+service-short+}.
291
290
using the ``User.functions`` method.
292
291
293
292
.. literalinclude:: /tutorial/generated/code/final/team.codeblock.getTeamMembers.js
294
- :emphasize-lines: 4
293
+ :language: javascript
295
294
296
295
* ``addTeamMember``
297
296
@@ -300,7 +299,7 @@ implement the calls to {+service-short+}.
300
299
parameter.
301
300
302
301
.. literalinclude:: /tutorial/generated/code/final/team.codeblock.addTeamMember.js
303
- :emphasize-lines: 12
302
+ :language: javascript
304
303
305
304
* ``removeTeamMember``
306
305
@@ -309,8 +308,7 @@ implement the calls to {+service-short+}.
309
308
{+service-short+} function and pass it the ``email`` parameter.
310
309
311
310
.. literalinclude:: /tutorial/generated/code/final/team.codeblock.removeTeamMember.js
312
- :emphasize-lines: 15
313
-
311
+ :language: javascript
314
312
315
313
316
314
H. Run and Test
0 commit comments