How to open a new tab with router.navigate in TypeScript
this is my solution const url = this.router.serializeUrl(this.router.createUrlTree([‘/my/url/route’], { queryParams: { …anyQueryParamsYouWantOrOmitThis } })); window.open(url, ‘_blank’);
this is my solution const url = this.router.serializeUrl(this.router.createUrlTree([‘/my/url/route’], { queryParams: { …anyQueryParamsYouWantOrOmitThis } })); window.open(url, ‘_blank’);
Do this in the order dotnet dev-certs https –clean Remove your keys and pem from C:\Users\%username%\AppData\Roaming\ASP.NET\https dotnet dev-certs https –trust Run SPA project with “start”: “set HTTPS=true&&react-scripts start” If you run your project(Point 4) before anything else. The authority is not trusted(done by 3) and results in authority invalid errors
A react application need not be a single page application. React provides you with a way model HTML in terms of classes with specific render logic, but doesn’t impose any sort of specific application logic like single vs multi page. I’m not quite sure I understand the rest of your questions, but I think you … Read more
Move your Index.html to the root of your project. Then install-package Microsoft.Owin.StaticFiles in Package Manager Console and add the code below: public class Startup { public void Configuration(IAppBuilder app) { const string rootFolder = “.”; var fileSystem=new PhysicalFileSystem(rootFolder); var options = new FileServerOptions { EnableDefaultFiles = true, FileSystem = fileSystem }; app.UseFileServer(options); } } This … Read more
Yes, it is very easy actually. Apply display:none to the top level div (or w/e container), and data-bind=”visible: true”. This will cause the page to be hidden until knockout unhides it via binding (which obviously can’t happen until its fully loaded). Since you are using a non-observable value, Knockout won’t even bother to re-check this … Read more
This is coming from the browser link feature in Visual Studio 2013 in the Standard toolbar. It is code that allows Visual Studio to interact with browsers running the code, and should only show up when running it in debug mode. To disable it (until the fix to the issue is made live in an … Read more
Nested subviews can be resolved by using v-view and v-ref. html <div id=”main”> <div v-view=”currentView” v-ref=”view”></div> </div> <ul> <li><a href=”#/”>top</a></li> <li><a href=”#/nest/view1″>nest/view1</a></li> <li><a href=”#/nest/view2″>nest/view2</a></li> </ul> <script id=”top” type=”x-template”> <div>top view</div> </script> <script id=”nest” type=”x-template”> <div> <span>nest view</span> <div v-view=”subview”></div> </div> </script> javascript Vue.component(‘top’, Vue.extend({ template: “#top”, })); Vue.component(‘nest’, Vue.extend({ template: ‘#nest’, components: { view1: Vue.extend({ … Read more
Where does SpaRoot get set? SpaRoot is set as a property in the project by the template. Projects contain a “static” portion; that is root-level PropertyGroup and ItemGroup elements. Note that properties are like a global key-value dictionary (and whenever an XML node in a PropertyGroup defines a property, it overwrites existing ones with the … Read more
I’ve getting through this same problem. My solution which is opinionated and may not respond to your criterias: When I package my front-app and my server-app, I share a configuration file containing the current version of the front-app. Front side: 75% of my routes change implicitly call a Webservice (route change resolve). SO each time … Read more
If you are using the newer analytics.js API, Google’s documentation requires the following code to trigger the event: ga(‘send’, ‘pageview’, ‘/some-page’); If you are using the older ga.js API, David Walsh suggests AJAX websites to use the _gaq.push method: _gaq.push([‘_trackPageview’, ‘/some-page’]);