martinsvb / ng2-summernote

Angula 2.0 summernote wysiwyg editor integration
14 stars 12 forks source link

Angular2 RC6 integration? #2

Open newmediamonkey opened 8 years ago

newmediamonkey commented 8 years ago

When I attempt to load ng2-summernote into RC6 version of Angular 2, I get the following errors:

node_modules/ng2-summernote/ng2-summernote.ts(20,50): error TS2304: Cannot find name 'Provider'. [0] node_modules/ng2-summernote/ng2-summernote.ts(129,18): error TS2339: Property 'toPromise' does not exist on type 'Observable'. [0] node_modules/ng2-summernote/node_modules/@angular/forms/src/directives.d.ts(44,39): error TS2314: Generic type 'Type' requires 1 type argument(s). [0] node_modules/ng2-summernote/node_modules/@angular/forms/src/directives.d.ts(48,48): error TS2314: Generic type 'Type' requires 1 type argument(s). [0] node_modules/ng2-summernote/node_modules/@angular/forms/src/form_providers.d.ts(13,38): error TS2314: Generic type 'Type' requires 1 type argument(s).

I have loaded ng2-summernote through ngModule declarations:

import {Ng2Summernote} from 'ng2-summernote/ng2-summernote';

@NgModule({ imports: [...], declarations: [... Ng2Summernote], bootstrap: [AppComponent ...] }) export class AppModule { }

package.json:

"dependencies": { "@angular/common": "2.0.0-rc.6", "@angular/compiler": "2.0.0-rc.6", "@angular/core": "2.0.0-rc.6", "@angular/forms": "2.0.0-rc.6", "@angular/http": "2.0.0-rc.6", "@angular/platform-browser": "2.0.0-rc.6", "@angular/platform-browser-dynamic": "2.0.0-rc.6", "@angular/router": "3.0.0-rc.2", "@angular/upgrade": "2.0.0-rc.6", "angular2-in-memory-web-api": "0.0.18", "bootstrap": "^3.3.6", "core-js": "^2.4.1", "ng2-summernote": "^1.10.7", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.11", "systemjs": "0.19.27", "zone.js": "^0.6.17" },

martinsvb commented 8 years ago

Hi, thank you for comment. I plan upgrade to RC.6. So, I will check it and let you know.

thehashrocket commented 7 years ago

This is happening in Angular2 Final as well. :/

xeor commented 7 years ago

Have anyone gotten any work done on this? Angular 2 final have been out for "a while" 😋 I looked at the issues here, and it looks like they can almost all be closed at once if we get it to work with ng2.

If noone have started to work on this, I might give it a try..

thehashrocket commented 7 years ago

@xeor nope, not yet. haven't had time, honestly.

xeor commented 7 years ago

I started working on getting this. I'm not able to work on this for a couple of days. If you want to take over, feel free. The changes are at https://github.com/xeor/ng2-summernote/commit/c268340a3e7b1f822aae502a0f597468b708f321

What is missing is getting the angular 2 module part working correctly, and figuring out a good way of dealing with bootstrap and summernote as a jquery plugin..

martinsvb commented 7 years ago

Hi all, sorry for late update, I was busy. ng2-summernote actually works as component. BR Martin

xeor commented 7 years ago

@martinsvb on angular 2 final? Can you give a quick example how you did it?

martinsvb commented 7 years ago

@xeor I added integration steps to readme file Please, let me know, if it works Thx, Martin

xeor commented 7 years ago

I am getting zone.js:158 Uncaught Error: Unexpected value 'Ng2Summernote' declared by the module 'AppModule' now if I try to import it as a component. It looks like https://github.com/angular/angular-cli/issues/1514#issuecomment-240910842 might explain it. I tried copying all the files into my local environment and load it using import { Ng2Summernote } from './ng2-summernote/ng2-summernote'; instead. And it kinda worked, a little better. But now it ended up being stuck at the same error as in https://github.com/martinsvb/ng2-summernote/issues/3

jarrettj commented 7 years ago

@xeor same issues here.

PTC-JoshuaMatthews commented 7 years ago

@xeor @jarrettj Same issue for me as well, did you guys find a solutions?