Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

can-route

Package Overview
Dependencies
Maintainers
11
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-route - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

49

doc/can-route.md

@@ -82,28 +82,27 @@ @module {Object} can-route can-route

import route from "can-route";
import DefineMap from "can-define/map/map";
import stache from "can-stache";
import "can-stache-route-helpers";
Component.extend( {
tag: "my-app",
autoMount: true,
ViewModel: DefineMap.extend( {
page: "string"
} ),
view: stache( `
{{#switch(page)}}
{{#case("home")}}
<h1>Home Page</h1>
<a href="{{#routeUrl(page='products')}}">Products</a>
{{/case}}
{{#case("products")}}
<h1>Products</h1>
<a href="{{#routeUrl(page='home')}}">Home</a>
{{/case}}
{{#default()}}
<h1>Page Not Found</h1>
<a href="{{#routeUrl(page='home')}}">Home</a>
{{/default}}
{{/switch}}
` )
} );
Component.extend({
tag: "my-app",
ViewModel: {
page: "string"
},
view: `
{{#switch(page)}}
{{#case("home")}}
<h1>Home Page</h1>
<a href="{{#routeUrl(page='products')}}">Products</a>
{{/case}}
{{#case("products")}}
<h1>Products</h1>
<a href="{{#routeUrl(page='home')}}">Home</a>
{{/case}}
{{#default()}}
<h1>Page Not Found</h1>
<a href="{{#routeUrl(page='home')}}">Home</a>
{{/default}}
{{/switch}}
`
});
route.data = document.querySelector( "my-app" );

@@ -110,0 +109,0 @@ route.register( "{page}" );

{
"name": "can-route",
"version": "4.1.1",
"version": "4.1.2",
"description": "Observable front-end application routing for CanJS.",

@@ -5,0 +5,0 @@ "homepage": "https://canjs.com/doc/can-route.html",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc