Created
September 30, 2016 07:55
-
-
Save prateekbh/1dd14ade044b24baadbbb8917e5e07e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rtr-router> | |
<router> | |
<route path ='/' component="rtr-home"/> | |
<route path ='/apis' component={this.parent.loadApiPage}/> | |
<route path ='/isomorphism' component="rtr-isomorphism"/> | |
<route path ='/prpl' component={this.parent.loadPrplPage}/> | |
</router> | |
<script> | |
this.loadApiPage = function(){ | |
return new Promise((resolve,reject)=>{ | |
require.ensure("./rtr-apis.tag",function(require){ | |
var apiTag = require("./rtr-apis.tag"); | |
resolve("rtr-apis"); | |
},"apis"); | |
}); | |
} | |
this.loadPrplPage = function(){ | |
return new Promise((resolve,reject)=>{ | |
require.ensure("./rtr-prpl.tag",function(require){ | |
var prplTag = require("./rtr-prpl.tag"); | |
resolve("rtr-prpl"); | |
},"prpl"); | |
}); | |
} | |
</script> | |
</rtr-router> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment