-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AoT for datepicker #1093
Comments
The datePicker property references to the DatePickerInnerComponent. I don't know if you should be allowed to access this property... The updateHours property I also don't know... Btw: I don't see the TimepickerModule in your ngModule definition... @valorkin it's your part :) |
Maybe, you could take a look at https://github.com/ocombe/ng2-translate where they created a make.js file to create a proper bundles/ folder with ngc. My datepicker tag : <datepicker
[(ngModel)]="date"
(ngModelChange)="onChangeDatePicker()"
[showWeeks]="false"
[startingDay]="1"
></datepicker> |
@lifaon74 you don't need bundles |
|
Property 'datePicker' is private and only accessible within class 'DatePickerComponent' |
|
as for now: internal methods are private as designed |
@valorkin Why closing issue if not solved ?
Why not put it public right now waiting for a bug fix, instead of blocking thousand of users ? same for All others libs I use supports AoT, only ng2-boostraps resists ;) |
Is there an official AoT bug issue or should we create one? |
@lifaon74 when I have added system.js bundles there are were no ngc Can you imagine miss use of internal methods? |
ngc comes with @angular/compiler-cli The bundles are made with "systemjs-builder", I use system-js too and have no problem with ES/UMD, you can have an example here of the config of the systemjs-builder. |
ok, |
@Martin-Wegner there are was an issue about and Rob closed it with |
@lifaon74 it is good reason to make PR |
I'll try something this we, but it will probably involve a lot of changes and I dont want to break all of your work. |
Just add in parallel, build to bundles2 for example, than I will try with couple of test projects I have and release |
Can you post the link to this issue please? |
@Martin-Wegner I am afraid no :( |
it seems any property decorator requires public access modifier |
check v 1.1.10 |
@lifaon74 should be working fine now |
Hey, good job :
Did you do something about : |
thing is ngfactory never was part of npm module |
@lifaon74 can you join slack and we will speak about it? |
So, I fork it and fix it here : https://github.com/lifaon74/ng2-bootstrap/commit/da5ff0e3f9c88bbc609cbdd990ed7d1746df7fc3
Build pass for ng2-boostrap and personal projects. I'm currently testing if everything works properly. Please take a look if I forgot something. |
Do PR and I will play with it |
It's not totally ready, I saw you're using a global variable for MouseEvent and Keyboard event and it brokes the execution,, I'll do a PR when it will be ready |
So I did a PR but dont have currently enouth time to test everything (CI). It builds and works for one of my project right now. I'll continue to test more later. |
Hum, I changed module es2015 to commonjs, for retrocompatibility. |
I don't know if my issue is related to this one, but I'm also trying to get AOT compilation working. I am using the carousel and I get this:
|
Okay, got it working by using the commonjs plugin: commonjs({
include: ["node_modules/rxjs/**", "node_modules/ng2-bootstrap/**"],
sourceMap: false
}), Update: Update 2: Update 3: |
ping @valorkin |
Working on it :( |
I will really appreciate if you will try and try published solution |
BTW I am using ng-cli with --aot flag to test |
I can confirm that it is working. |
Working for me too, thanks for this great feature ! |
just to have your heads up, when I am done |
Well too early to congratulate: Could you export the classes from CarouselModule as well? |
@dhardtke try to clean install |
because it is exported |
@dhardtke I will close the issue until your feedback is negative. |
It works if I clone the repo manually (latest version) and put it in node_modules/. With |
ping @Martin-Wegner |
Hm, it is strange |
Okay, I fixed it. First, my npm was behaving weirdly so I had to remove node_modules and install again. But that has nothing to do with why it wasn't working. Please have a look at this: // import {CarouselModule} from "ng2-bootstrap/components/carousel/carousel.module";
// import {CollapseModule} from "ng2-bootstrap/components/collapse/collapse.module";
// import {DropdownModule} from "ng2-bootstrap/components/dropdown/dropdown.module";
import {CarouselModule} from "ng2-bootstrap/components/carousel";
import {CollapseModule} from "ng2-bootstrap/components/collapse";
import {DropdownModule} from "ng2-bootstrap/components/dropdown";```
If I was importing the modules like the first, commented statements show, it wouldn't work.
So without "/modulename.module" in the import statements it's working fine with the latest (stable) version.
Thanks again! |
Awesome! Seems I need to simplify file structure so no one will repeat your issue |
Re-open : #1080
The bug it still there after updating to 1.1.9, please take care to do tests before closing issues, I'll be happy to test it for you if needed. For me it's not an
@Hostbinding
problem.Trying to build with ngc (last version installed) :
Results in :
Seems Datepicker is not AoT ready ;). Hope it will be soon.
The text was updated successfully, but these errors were encountered: