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
^ - remember when I got rid of ng-controller? It's here
144
180
- lets focus on deals state first
145
181
- url, template, controller, as
146
182
- parent
147
183
- parent state
148
184
- ui-view template
149
-
- data permissions
185
+
- data permissions (will go over this in a minute)
186
+
- lets jump back to front-end permissions
150
187
151
188
---
152
189
153
190
# Angular Routing
154
191
155
-
<br>
192
+
New and Show routes:
156
193
157
-
##`%a(ui-sref='dealsNew') New Deal`
194
+

158
195
159
-
^ Will trigger state change
196
+
^ two different state routes
197
+
- one with no params, the other with a required dealkey param
198
+
- both Will trigger state changes, change URL, not reload browser
199
+
- you can also pass arbitrary params to routes and handle them on a case-by-case basis
200
+
- now lets go over permissions (next)
160
201
161
202
---
162
203
163
204
# Angular Routing
164
205
165
-
<br>
166
-
167
-
##`%a(ui-sref="dealsShow({ dealKey: deal.key})") Show Deal`
206
+
##in `deals/router.js.coffee`:
168
207
169
-
^ You can send any params through there
208
+

170
209
171
-
---
210
+
##in `shared/permissions.constant.js.coffee`:
172
211
173
-
# Angular Routing
174
-
175
-

176
212

177
213
178
-
^ Make sure you have all permissions in the constant file
179
-
- if you don't, don't worry, you'll be reminded
214
+
^ So, remember that data-permission hash?
215
+
- Make sure you have all permissions in the constant file
216
+
- if you don't, don't worry, you'll be reminded (next)
180
217
181
218
---
182
219
183
220
# Angular Routing
184
221
185
222

186
223
224
+
^ Auth will fail, and you'll get this console error message
225
+
- Now lets get into some small implementation details about permissions
226
+
187
227
---
188
228
189
229
# Angular Routing
@@ -192,9 +232,12 @@ In case wrapping the partial causes issues:
192
232
193
233

194
234
195
-
^ There's a lot of technical mumbo jumbo that you can read if you have time
235
+
^ Heres the basic method that does 90% of the work
236
+
- There's a lot of technical details that you're interested
237
+
- checks against manage first, since that encompasses all actions of a feature/resource
238
+
- maybe feature is the wrong variable name here
196
239
- but basically it ends up here, checking against the users cancan abilities
197
-
- you can also do custom checking like this
240
+
- you can also do custom checking like this (next)
198
241
199
242
---
200
243
@@ -204,9 +247,11 @@ In case wrapping the partial causes issues:
204
247
205
248

206
249
207
-
^ See here you can use that can method, or do something custom
208
-
- you can modify this file and allow custom attributes or something like that
250
+
^ This is part of a switch statement in the main canAccess method
251
+
- See here you can use that can method, or do something custom
252
+
- you can modify this file and allow custom attributes or something other than key potentially
209
253
- checking role or pub key to only allow user to see their own pub content
254
+
- and here is where the permission service gets called (next)
210
255
211
256
---
212
257
@@ -215,52 +260,108 @@ In case wrapping the partial causes issues:
215
260

216
261
217
262
^ lots of stuff here again, but it's not super important to understand
263
+
- check if logged in, unless state is login (doesn't exist yet)
218
264
- basically the parent publisher stuff might be important
219
-
- logged in, unless state is login (doesn't exist yet)
220
265
- if there is a parent you must be able to see parent
221
266
- make sure you can also access curent
222
267
- if unauthorized, go to a pseudo 404 page
223
268
- prevent default if you are not logged in
224
269
- get current user (pseudo log in)
225
270
- set user in session, recurse
271
+
- one last thing I'd like to mention
226
272
227
273
---
228
274
229
-
# State Changes
275
+
# Router Resolving
276
+
277
+

278
+
279
+
^ Router resolving is a very cool concept
280
+
- It takes code from this:
230
281
231
282
---
232
283
233
-
# Display formulas
284
+
# Router Resolving
234
285
235
-
Easily include mathematical formulas by enclosing TeX commands in `$$` delimiters. Deckset uses [MathJax](http://www.mathjax.org/) to translate TeX commands into beautiful vector graphics.
286
+

236
287
237
-
Formula support is available as in-app purchase. See the next slide for an example.
288
+
^ ...to this
238
289
239
-
<aname="formulas"></a>
290
+
---
291
+
292
+
# Router Resolving
293
+
294
+

295
+
296
+
^ ...and this
297
+
- Use route resolves for data that is required before the page loads
298
+
- prevents things like stuff showing up then snapping around once data is loaded
299
+
- will cause initial page load to take longer so...
300
+
- we need to establish a pattern showing that the page is loading
301
+
- but it also gets rid of lots of prepareData calls and jittery pages
240
302
241
303
---
242
304
243
-
## Schrödinger equation
305
+
# Gotchas and Interestings
306
+
307
+
Coffeescript + Inline-Edit:
244
308
245
-
The simplest way to write the time-independent Schrödinger equation is $$H\psi = E\psi$$, however, with the Hamiltonian operator expanded it becomes:
0 commit comments