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
Simply comment out the logic within HomeController, and replace `@Html.Raw(ViewData["SpaHtml"])` with just your applications root
365
373
AppComponent tag ("app" in our case): `<app></app>`.
366
374
367
-
> You could also remove any `ifPlatformBrowser/etc` logic, and delete the boot-server, browser-app.module & server-app.module files, just make sure your `boot-client` file points to `app.module`.
375
+
> You could also remove any `isPlatformBrowser/etc` logic, and delete the boot-server, browser-app.module & server-app.module files, just make sure your `boot-client` file points to `app.module`.
368
376
369
377
### How do I have code run only in the Browser?
370
378
@@ -382,7 +390,7 @@ better, more abstract ways of dealing with the DOM in Angular (2+) such as using
382
390
Yes, of course but there are a few things you need to setup before doing this. First, make sure jQuery
383
391
is included in webpack vendor file, and that you have a webpack Plugin setup for it. `new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' })`
384
392
385
-
Now, make sure any "plugins" etc that you have, are only included in your `boot-client.ts` file. (ie: `import 'slick-carousel';`)
393
+
Now, make sure any "plugins" etc that you have, are only included in your `main.browser.ts` file. (ie: `import 'slick-carousel';`)
386
394
In a Component you want to use jQuery, make sure to import it near the top like so:
0 commit comments