我有一个包含以下模板的父组件:
<ion-content>
<blocks-banners-slideshow class="contentBlock" [config]="{ zone: 'mobile'}" [config_private]="{ url: 'url'}" [slideOptions]="{ loop: true, pager: true}"></blocks-banners-slideshow>
<blocks-catalog-category class="contentBlock" [config]="{ parent_id: 0 }" [config_private]="{ url: 'url'}"></blocks-catalog-category>
<blocks-catalog-topproducts class="contentBlock" [config]="{ filter: { dir: 204}, page: 1, pageSize: 8}" [config_private]="{ url: 'url', showMoreProducts: false, columns: { tablet: 4, phone: 2}}"></blocks-catalog-topproducts>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
然后应用程序尝试显示它告诉我:未处理的承诺拒绝:
模板解析错误:
Can't bind to 'config_private' since it isn't a known property of 'blocks-banners-slideshow'.
1. If 'blocks-banners-slideshow' is an Angular component and it has 'config_private' input, then verify that it is part of …
Run Code Online (Sandbox Code Playgroud) 如何在Webpack中禁用重命名功能名称?我在代码中输入了类的名称:
import { MenuBlocksMenuPage } from "../pages/menu/blocks/menupage";
Run Code Online (Sandbox Code Playgroud)
但是在已编译文件中,该行变为不可读的字符串。
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_73__pages_menu_blocks_menupage__ = __webpack_require__(669);
Run Code Online (Sandbox Code Playgroud)
我的问题是:Webpack中有哪些选项可以禁止更改类或函数名称?
Android 和桌面版 Chrome 支持“beforeinstallpromp”事件,该事件可以显示添加到主屏幕横幅。我尝试在 iOS 中为我的 PWA 使用相同的 javascript 代码,但它不起作用。
/**
* Clear caches
*/
function pwaClearCaches()
{
//Clear caches
caches.keys().then(function(names) {
for (let name of names) {
caches.delete(name);
}
});
}
var pwa_app_installed = false; //PWA is already installed
var deferredPrompt; //Link to show dialog event
$(document).ready(function(){
if (window.location.protocol === 'http:') { //???? ??? HTTP ????????, ? ?? HTTPS
console.log(lang.t('You need HTTPS for work'));
}
if ('serviceWorker' in navigator) {
/**
* ????????????? ?? ???????????? ?????? ??????, ????? ????? …
Run Code Online (Sandbox Code Playgroud)如何使用 TypeScript 中的方法动态扩展类?有什么例子吗?我尝试:
UsersBlocksMyOrders.prototype.myFunc = function():any{
alert('23434');
};
Run Code Online (Sandbox Code Playgroud)
但是编译器给了我一个错误。
我有模板的组件有输入标签.我需要以某种方式设置我的类公共属性的值.
这该怎么做?
@Component({
selector: 'delivery-additional-html',
template: `<input type="hidden" #var [value]="'123'"/>`
})
class CustomDeliveryAdditionalHTML implements AfterViewInit {
@Input('var') delivery_extra: any;
ngAfterViewInit()
{
console.log(this.delivery_extra); //Show undefined
}
}
Run Code Online (Sandbox Code Playgroud)
我希望在this.delivery_extra中有"123"值.
javascript ×3
typescript ×3
angular ×2
input ×2
bind ×1
dom-events ×1
function ×1
inheritance ×1
ios ×1
properties ×1
prototype ×1
webpack ×1
workbox ×1