1inus / ngx.layer Goto Github PK
View Code? Open in Web Editor NEWangular2 dialog plugin
Home Page: http://ng2-layer.wemakers.net/
License: Apache License 2.0
angular2 dialog plugin
Home Page: http://ng2-layer.wemakers.net/
License: Apache License 2.0
能否給一個在cli下引入的demo,我嘗試了幾個方法均無效。
following the document, installed angular2-layer, then the systemconfig.js:
'angular2-layer': 'npm:angular2-layer',
...
"angular2-layer" : { main: 'ng2-layer.js', defaultExtension: 'js'},
then I got the following error with "import {NgLayer, NgLayerRef} from 'angular2-layer'":
iisp-report-show/src/favorite/favorite.component.ts(3,35): error TS2307: Cannot
find module 'angular2-layer'.
same problem to use "ng2-layer " instead of 'angular2-layer'.
Then I copy the ng2-layer.ts to my project and got the following errors:
src/ng2-layer.ts(465,2): error TS4055: Return type of public method from exported class has or is using private name 'layerWraper'.
src/ng2-layer.ts(638,27): error TS2339: Property 'getOwnMetadata' does not exist on type 'typeof Reflect'.
src/ng2-layer.ts(641,26): error TS2339: Property 'getOwnMetadata' does not exist on type 'typeof Reflect'.
src/ng2-layer.ts(664,17): error TS2345: Argument of type 'void' is not assignable to parameter of type '{} | PromiseLike<{}>'.
src/ng2-layer.ts(678,14): error TS2345: Argument of type 'void' is not assignable to parameter of type '{} | PromiseLike<{}>'.
src/ng2-layer.ts(683,13): error TS2345: Argument of type 'void' is not assignable to parameter of type '{} | PromiseLike<{}>'.
src/ng2-layer.ts(730,7): error TS2322: Type '{ title: string; align: string; closeAble: true; cancelText: string; okText: string; outSelector:...' is not assignable to type 'LayerConfig'.
Property 'declarations' is missing in type '{ title: string; align: string; closeAble: true; cancelText: string; okText: string; outSelector:...'.
17:24:14 - Compilation complete. Watching for file changes.
看了文件說明,可以透過 Data 傳資料給 DialogComponent ,但沒有範例,不知如何使用
感謝
Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'undefined'. Current value: 'dialog_body'. It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?
setup-dialog.component.html 如下:
<div id="id_content">
<h1>dffddf</h1>
</div>
<hr>
<div id="id_foot" fxLayoyt="row">
<button >Delete</button>
<button >Cancel</button>
<button >Save</button>
</div>
感激不儘
npm:https://www.npmjs.com/package/angular2-layer
welcome and advice
你好,现在有弹窗1和弹窗2,在弹窗1上打开弹窗2,现在需要关闭弹窗2后打开弹窗1。
弹窗1组件中:
this.l.dialog({
title : 弹窗2“”,
dialogComponent : editAddrComponent,//editAddrComponent为弹窗2的组件
parent : this,
closeAble : true,
data : addr
})
弹窗2组件中:
setOnClose回调打开弹窗一
this.l.dialog({
title :"弹窗1",
align :"top",
dialogComponent : addrListComponent,//addrListComponent为弹窗1的组件
closeAble : true
});
这样就导致两弹窗之间需要相互Import,angular会提醒Warnings while compiling。这怎么解决呢?望解答,谢谢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.