joni2back / angular-filemanager

JavaScript File Manager Material Design Folder Explorer Navigator Browser Manager in AngularJS with CSS3 Responsive (with FTP in PHP / Java / Node)
https://joni2back.github.io/angular-filemanager/
MIT License
1.76k stars 577 forks source link

Is it working with angular-4? #339

Open zbeedatm opened 6 years ago

zbeedatm commented 6 years ago

Hi, I'm trying to add this component to my angular-4 app, but I'm getting:

ERROR in D:/workspace/ResourceManagerFileBrowse/dev/ResourcesManagement/web/ResourceManagerWebClient/src/app/app.module.ts (13,60): Cannot find module '../../../main'. ERROR in Error: Error encountered resolving symbol values statically. Reference to a local (non-exported) symbol 'fileManagerConfiguration'. Consider exporting the symbol (position 53:7 in the original .ts file), resolving symbol AppModule in D:/workspace/ResourceManagerFileBrowse/dev/ResourcesManagement/web/ResourceManagerWebClient/src/app/app.module.ts at positionalError (D:\workspace\ResourceManagerFileBrowse\dev\ResourcesManagement\web\ResourceManagerWebClient\node_modules\@angular\compiler\bundles\compiler.umd.js:25134:35) at simplifyInContext (D:\workspace\ResourceManagerFileBrowse\dev\ResourcesManagement\web\ResourceManagerWebClient\node_modules\@angular\compiler\bundles\compiler.umd.js:24977:27) at StaticReflector.simplify (D:\workspace\ResourceManagerFileBrowse\dev\ResourcesManagement\web\ResourceManagerWebClient\node_modules\@angular\compiler\bundles\compiler.umd.js:24991:13) at StaticReflector.annotations (D:\workspace\ResourceManagerFileBrowse\dev\ResourcesManagement\web\ResourceManagerWebClient\node_modules\@angular\compiler\bundles\compiler.umd.js:24418:41) at _getNgModuleMetadata ......

In my app.module.ts I have the following:

import {FileManagerModule, IFileManagerConfiguration} from '@rign/angular2-filemanager'; const fileManagerConfiguration: IFileManagerConfiguration = { urls: { foldersUrl: '/api/folder', filesUrl: /api/files, folderMoveUrl: '/api/folder/move' }, isMultiSelection: true, mimeTypes: ['image/jpg', 'image/jpeg', 'image/png'], maxFileSize: 50 * 1024, allowChooseMultipleFiles: true } @NgModule({ declarations: [ AppComponent, ... ], imports: [ BrowserModule, HttpModule, FormsModule, ReactiveFormsModule, RouterModule.forRoot(appRoutes, { useHash: true }), TabsModule.forRoot(), ConfirmModule, TreeModule, FileManagerModule.forRoot(fileManagerConfiguration) ], providers: [ ... ], bootstrap: [AppComponent] }) export class AppModule { // enableProdMode(); }

package.json:

{ "name": "data-fab-resource-manager", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/router": "^4.2.4", "@rign/angular2-filemanager": "^1.3.0", "angular-ivh-treeview": "^1.1.0", "angular-tree-component": "^7.0.2-beta1", "angular2-bootstrap-confirm": "^1.0.4", "core-js": "^2.4.1", "ngx-bootstrap": "^2.0.0-rc.0", "ngx-filemanager": "0.0.0", "rxjs": "^5.4.2", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "1.4.9", "@angular/compiler-cli": "^4.2.4", "@angular/language-service": "^4.2.4", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "~3.2.0", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "mobx": "^3.6.2", "protractor": "~5.1.2", "reflect-metadata": "^0.1.10", "ts-node": "~3.2.0", "tslint": "~5.7.0", "typescript": "~2.3.3" } }

AndreasSchmid1 commented 6 years ago

i am interested in a angular 2-6 typescript version as well