AZ
Size: a a a
AZ
РБ
AZ
let error = null;
const submit = ({..})=>{
fetch().then(res=>res.json()).then(data=>{
userData = data
})
.catch(err=>{
error = err
})
}
Г
DS
PM
import Home from '';
import Products from '';
const routes = [{
path: '/products',
component: Products
}, {
path: '/',
component: Home
}];
import { derived } from 'svelte/store';
import { path } from 'svelte-pathfinder';
export const page = derived(path, $path => {
for (let route of routes) {
if ($path.pattern(route.path)) {
return route.component;
}
}
}, null);
<Viewpoint component={$page} />
PM
PM
PM
PM
DS
import Home from '';
import Products from '';
const routes = [{
path: '/products',
component: Products
}, {
path: '/',
component: Home
}];
import { derived } from 'svelte/store';
import { path } from 'svelte-pathfinder';
export const page = derived(path, $path => {
for (let route of routes) {
if ($path.pattern(route.path)) {
return route.component;
}
}
}, null);
<Viewpoint component={$page} />
PM
РБ
let userData = {}
const submit = ({..})=>{
fetch().then(res=>res.json()).then(data=>{
userData = data
})
}
РБ
РБ
РБ
РБ
РБ
DK
new Component({прокинуть еще chilld component, т.е.
target: container
})
<Component><h1>test</h1></Component>а как прокинуть в Component дочерний компонент если использовать вызов через new Component ??
DK
new Component({прокинуть еще chilld component, т.е.
target: container
})
<Component><h1>test</h1></Component>а как прокинуть в Component дочерний компонент если использовать вызов через new Component ??