Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: third_party/polymer/v0_8/components-chromium/more-routing/more-routing-config-extracted.js

Issue 1155683008: Rename polymer and cr_elements v0_8 to v1_0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v1
Patch Set: fix a merge mistake Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1
2
3 Polymer({
4
5 is: 'more-routing-config',
6
7 properties: {
8
9 /**
10 * The routing driver to use.
11 *
12 * * `hash`: `MoreRouting.HashDriver`
13 * * `path`: `MoreRouting.PathDriver`
14 * * `mock`: `MoreRouting.MockDriver`
15 *
16 */
17 driver: String,
18
19 /**
20 *
21 */
22 urlPrefix: String,
23
24 },
25
26 ready: function() {
27 var config = {};
28 if (this.urlPrefix) config.prefix = this.urlPrefix;
29
30 var driver;
31 // TODO(nevir): Support custom drivers, too.
32 if (this.driver === 'hash') {
33 driver = new MoreRouting.HashDriver(config);
34 } else if (this.driver === 'path') {
35 driver = new MoreRouting.PathDriver(config);
36 } else if (this.driver === 'mock') {
37 driver = new MoreRouting.MockDriver(config);
38 } else {
39 throw new Error('Unknown driver type "' + this.driver + '"');
40 }
41
42 MoreRouting.driver = driver;
43 },
44
45 });
46
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698