Edit:
@jhipster/developers if you have started working on any of the item below, please edit this comment and add your name after the item. Once feature is complete please tick it off, pretty please 😄 - @deepu105
The tasks below can be edited and changed, depending on the discussions below:
client-2
instead of client
so that users can choose what they want -> with "client" they will stay on AngularJS 1 (and have less risk), with "client-2" they follow our migration path, and will end up with AngularJS 2 app in the end (but more work/risk for them). All work is now done on "client-2"entity-2
sub generator to use when project is using client-2
entity-2
sub-generatorclient
and make client-2
default (major version release)The known issues checklist has been moved to #4407 to make this thread lighter
If anyone is looking for a guide to use the angular-2 branch here it is https://github.com/jhipster/generator-jhipster/blob/angular-2/NG2-GUIDE.md
I would follow this example on the angular website:
There's other steps after of course but that would be a good start !
I think we should also consider generating a project that is compatible with angular-cli as this is the new official way to scaffold a project and run some other commands like generating new routes, linting, running tests, ...
In some way, angular-cli overlaps with yeoman.
This document does give us a lot of insights on upgrade from 1.x to 2
@gmarziou 💯 agree
I have created the client-2 sub generator in a new branch https://github.com/jhipster/generator-jhipster/tree/angular-2
we can do development in this branch until the client-2 is ready to be provided as beta option, so that we can still do pach releases of our master if required.
I have added the typescript dependencies and angular 2 dependencies in the package.json. we need to move all the bower dependencies to package.json (some might not be angular2 compatible yet and some might not be available for npm, we need to find workarounds for those)
we also need to setup gulp to process typescript here is a good tutorial http://blog.scottlogic.com/2015/12/24/creating-an-angular-2-build.html
@wmarques please proceed to change to typescript if you have time else ill do it on Monday.
Can we use broccoli ?
@sendilkumarn gulp is still the most popular and stable build and I dont see why we would want to move away from that also lot of people have put in a lot of effort to make our gulp build as stable as today so I dont think we need to jeopardize that.
@sendilkumarn btw if you are interested you can do the gulp typescript integration step, follow the link I shared above
I will give a shot to it.
Thanks @deepu105 , let's work on this branch -> for me we can release this as an "early alpha version" very soon, it doesn't do any harm as long as we warn people it's not ready
Yes we can do an Alpha, but we need atleast typescript working on the
client-2 for that else it would be same as client. Ill try to move all js
-> ts soon.
Thanks & Regards,
Deepu
On Mon, Jun 6, 2016 at 4:39 PM, Julien Dubois [email protected]
wrote:
Thanks @deepu105 https://github.com/deepu105 , let's work on this
branch -> for me we can release this as an "early alpha version" very soon,
it doesn't do any harm as long as we warn people it's not ready—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-223899779,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF9aI2ddMrd3symc4aoT7UOc4EYNgks5qI9y7gaJpZM4Ipod9
.
Excellent! I had wondering about this for a little while, and had already set up an "edge" branch for myself, to play around with Angular2 and Gulp4, before being sidetracked by another project.
Typescript sounds like a natural choice since Angular 2 is built with it, and Gulp allows even the build itself to be written in typescript, in gulpfile.ts
. Or maybe ES6 would be a more widely favoured choice?
Anyway, thanks for opening this issue, looking forward to seeing how this develops.
dropping bower
we can add angular 2 dependencies via npm. I think for referencing files, we need to have either gulp task or move node_modules inside webapp
@deepu105 I won't have alot of time today sorry :(
@sendilkumarn Agree, we should move the node_modules inside webapp in order to reference dependencies in our index.html file.
Here is a very minor work on using systemjs + typescript : https://github.com/wmarques/Ng2JhiSample
I just moved to TypeScript (removed IIFE + angular.controller...
lines) and added export ..
. line at the end of the file (see here). Then I imported each controller, services in app.module file. Then I load this module using SystemJS in index.html
It simply displays the home page and there is no Auth logic in it, to make it work fully I have to import all controllers etc in app.module
and I didn't have time do it.
I'm having some weird issue with the typings. on windows when i do npm i typings
i'm able to do npm run typings install
but if I add typings to package.json
and then do npm i
and when i run npm run typings install
I get error as the typings executable is not present in the node_modules/.bin
folder. @wmarques could you check this in your machine to see if this is a windows only issue?
@wmarques @sendilkumarn I already moved to ts fully and integrated systemJS. I didnt move node_modules to webapp instead I wrote a copy task in gulp to move only required files to a vendor folder. @wmarques I will see what you have done as well
@deepu105 seems to work fine on my computer.
Oh yes, it's even better if gulp copy required files only !
Do you think we should split our app in little modules ?
@wmarques yes we should. we should atleast make the following modules
@deepu105 @wmarques may be we can split
@wmarques @sendilkumarn when you have time can you try to generate an app using this branch and see if what I have done is ok? It works for me but there is one weird ts error on console and a lot of repetitive logs from the language service
I tried. It does have some error. I will let you know on that
@deepu105 Ok will try to work on it once I have some time. Yep I'll try this and check if I can fix some errors :)
@sendilkumarn I guess I missed a file. Try now
oups sorry for the previous commit message. I was trying to follow your commit message convention but I didn't realize it would be picked up by github. I'll stop doing this, I'll only mention it the PR if i'll ever get to this point ;)
its ok @francisoud
can we move compiled js files outside app folder. Its confusing sometimes
@sendilkumarn ya it was confusing for me as well :(
@jhipster/developers what do you think of the below?
We can have the .ts
files and .html
files in the app directory under webapps as in current branch and this will only have the source files
There will be a gulp task which is running as part of gulp serve
1. It will compile the .ts
files as it changes to the target|build/www
directory
2. it will copy .html
files as it changes to the target|build/www
directory
3. The required dependency files from node_modules
will be copied to target|build/www/vendor
directory
We need to make target|build/www
directory as the webapp root similar to what we do for prod build so irrespective of profile we will always serve web assets from this folder either as un compressed js files or as compressed js files with sourcemaps.
This is similar to what @erikkemperman wanted to do earlier for our current version but I was against it as I didnt want developers to always have a gulp serve
running. But that was for angular1, with angular2 we need to have gulp serve
running always anyway for ts file compilation so riding on the same to copy assets to target|build/www
would be ok as well. (@erikkemperman dont be mad at me, I personally still stand by by original view but I dont want to be a bottleneck here, I dont like Typescript as well but I would relax my view for the community needs this time)
second that
@deepu105 Haha, I am furious! But seriously, I completely understand your point of view, of course.
Actually I have been reading about a school of thought that says you can do most things straight from npm scripts, no need for a separate build tool with plugins, because basically all essential components (lint, transpile, minify, watch) have cli anyway, or otherwise are easily wrapped in a portable script.
I'm not sure if that will work for complex projects like this, although I think it would be interesting to see how far one gets. That would remove Deepu's objection, I suppose, because npm scripts should work everywhere. Would anyone be interested if I gave that a try, when I find some time?
Or alternatively, would anyone be interested in trying to adapt to Gulp 4? It's not yet released, but I've been contributing some little bits here and there and it seems to be finally getting there. It promises to be a real improvement over the current version, especially regarding composing tasks and error propagation.
I would be more interested in gulp4 rather than hacking npm to do all
these.
Npm would work in theory and may be after some real painfull hacks it might
do all what we do today but in the end that package.json would look real
ugly and will scare away an average user.
Of course you could write external js files and call those but then you are
re inventing something similar to gulp without the speed of gulp of course.
IMO its just a hacky way without much real benefit in the end.
And writing complex builds with json, good luck with that :P
On 8 Jun 2016 19:07, "Erik Kemperman" [email protected] wrote:
@deepu105 https://github.com/deepu105 Haha, I am furious! But seriously,
I completely understand your point of view, of course.
Actually I have been reading about a school of thought that says you can do
most things straight from npm scripts, no need for a separate build tool
with plugins, because basically all essential components (lint, transpile,
minify, watch) have cli anyway, or otherwise are easily wrapped in a
portable script.
I'm not sure if that will work for complex projects like this, although I
think it would be interesting to see how far one gets. That would remove
Deepu's objection, I suppose, because npm scripts should work everywhere.
Would anyone be interested if I gave that a try, when I find some time?
Or alternatively, would anyone be interested in trying to adapt to Gulp 4?
It's not yet released, but I've been contributing some little bits here and
there and it seems to be finally getting there. It promises to be a real
improvement over the current version, especially regarding composing tasks
and error propagation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-224558241,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF3O-Es7aLShebifTdUOJJwMmu-r_ks5qJqKBgaJpZM4Ipod9
.
@deepu105 All true, and I originally had the same feeling about this. But now I've seen a few examples of reasonably elaborate builds, and I must say it's not nearly as bad as I expected. But yeah, probably JH is too complex.
If I have some time I might give Gulp 4 a go based off this branch, but I should probably wait a bit for things to settle slightly -- both here in this angular 2 effort and my day job.
@wmarques I have split the app to multiple modules
@sendilkumarn can you convert the admin module to angular2?
Am working on it. In between stuck with other activities. I will update
@sendilkumarn thanks. @jhipster/developers this is actually lot more work then we anticipated so we might require more hands here
@jdubois could you add @sendilkumarn to the https://github.com/orgs/jhipster/teams/hipsters group so that I can assign him to this ticket as well
I can't do it right now, but I think this has changed on Github, and you can assign tickets to anyone now.
@deepu105, I am going to start on accounts
module. Hope nobody started yet.
@deepu105 Not sure how to start at the moment. I've started looking at some components inside common
. I have rewritten the ProfileInfoService
(according to the ng2 tutorial) like this (looks fine to me, but its my first hands on ng2 and ts):
import { Injectable } from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/add/operator/toPromise';
import {ProfileInfo} from 'profileInfo.class'
@Injectable()
export class ProfileService {
private profileInfoUrl = 'api/profile-info';
constructor(private http: Http) {
}
getProfileInfo(): Promise<ProfileInfo> {
return this.http.get(this.profileInfoUrl)
.toPromise()
.then(response => {
let data = response.json().data;
ProfileInfo pi = new ProfileInfo();
pi.activeProfiles = data.activeProfiles;
pi.ribbonEnv = data.ribbonEnv;
pi.inProduction = data.activeProfiles.indexOf("prod") !== -1;
pi.swaggerDisabled = data.activeProfiles.indexOf("no-swagger") !== -1;
return pi;
})
.catch(this.handleError);
}
private handleError(error: any) {
console.error('An error occurred', error);
return Promise.reject(error.message || error);
}
}
So whats next? How to integrate that new servic and how to test it works correctly? How to we handle 3rd party dependencies that are not yet available as ng2 versions?
@atomfrede The idea now is to use the upgrade adapter to import the ng2 service and use it in an ng1 app so that we can still use the external libs. Can you commit your change. Ill try to import this into the app tomorrow.
@tapas4java i guess no body has started. Cc @mraible as he might be starting something so to avoid duplicate work.
@jdubois I tried but couldn't anyways not urgent do it when you have time
@deepu105 Sure, just need to integrate into the generator
EDIT: here are my changes: https://github.com/atomfrede/generator-jhipster/commit/161ff39a1ea12226ca5500b8fd7cf6ce48b059d4
I also tried to convert the ribbon directive to an ng2 component
@atomfrede ok ill wait for you to commit into the branch. don't worry if tests fail or if app doesn't work, we can get it fixed on the way
Since there is no opposition for my proposal to move all generated js code into temp folders ill be doing that change first.
@deepu105 Should I open a PR against the angulat2 branch?
I guess you can directly commit if you want. or PR if you want the change to be reviewed.
I just added @sendilkumarn to the "hipsters" team on Github
@deepu105 agree with you, it's very confusing to have .ts, .js and even .map in same folder so we should copy them into the target
folder and keep typescript files in the src
one :+1:
@wmarques im working on that
@deepu105 I'm having some trouble when generating an NG2 app, I let the default choices, instead of the angular version, and at the end in doesn't copy any files so I just have an src
folder... But maybe it's just my computer, I'm trying to update Yeoman
EDIT : If I choose Angular1 it works. Updated Yeoman and using Node 4.4.4 still the same issue :cry:
I pushed a fix can you check now
Thanks & Regards,
Deepu
On Tue, Jun 14, 2016 at 4:24 PM, William Marques [email protected]
wrote:
@deepu105 https://github.com/deepu105 I'm having some trouble when
generating an NG2 app, I let the default choices, instead of the angular
version, and at the end in doesn't copy any files so I just have an src
folder... But maybe it's just my computer, I'm trying to update Yeoman—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-225812713,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF8gc_wduCxIu00fSb4F8-d9qXrENks5qLmU3gaJpZM4Ipod9
.
It generates the app and during gulp install
the files are copied to target|buil/www
folder and gulp serve
puts compiles ts files and html to this folder so when you boot the app everything is run from target|build
its not perfect yet but works for the moment. when you access the app it wont work as there are lots of errors on console from system js and stuff as we need to convert more files to load atleast one module fully
@wmarques I wont have time today to fix the console errors so if you have some time please see if you can fix the issues
@deepu105 The fix worked thanks ! I'm checking console errors
@wmarques is it working ?
@deepu105 it copied the file and everything but I have alot of console errors from SystemJS as you said
I don't understand the workflow, shoud I run npm run tsc:w
or gulp or both ?
One thing, when we load js with System.Register
we should not use Script. Removing that removes all the SystemJs Related errors
gulp throws me an error when doing "clean" task : directory not empty
Also during yo jhipster inject:test fails
System.Register is not including all the libraries. Only app.main.ts and upgrade_adapter is loaded.
I have to admit that I don't understand why it seems to not take care of typings... it tells me angular is undefined and don't find any import..
Does all the modules in app[folder] get loaded?
Nope I wrote too fast, it's not working :( Seems strange, I did the very same thing on my sample repo..
Guys as I said we need to migrate atleast one module fully for it to work.
Also the install task copies and compiles ts first for further edits either
have gulp serve running or use npm run tsc or gulp tscompile both does same.
Yes all scripts need to be imported but we need migrate them to export the
class in order to import
On 14 Jun 2016 21:13, "William Marques" [email protected] wrote:
Nope I wrote too fast, it's not working :( Seems strange, I did the very
same thing on my sample repo https://github.com/wmarques/Ng2JhiSample..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-225876698,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF9pbjLDYVGuuIv7vSm6MyScATVoAks5qLqkSgaJpZM4Ipod9
.
Yes but even if we do an export default in app.state.ts
, we can't import it in app.module.ts
@wmarques I didnt get you, why do you say that?
I have reduced the errors on console. app still doesn't load there is one error left. I guess it needs some more services to be exported
ng1 one was much much simpler :sob:
@sendilkumarn @tapas4java @wmarques @mraible @atomfrede guys plz do let me know if you are working on any files so that I dont do the same. changelist so far https://github.com/jhipster/generator-jhipster/compare/angular-2?expand=1
What did you do to load them?
I have imported them in the *.module.ts
files, I havent imported everything so far only blocks and few components are imported. As we export new files those can be imported. check the app.module.js
and common.module.js
for ref
@deepu105 I meant that my text editor (Atom) with tslint tells me that AppStateConfig
isn't found in app.state.ts
file. And agree with you, ng1 was so much simpler to build but ng2 will be much easier to use imo :)
I'll tell you if I have time today to fix some errors
Oh ya those, I ignored them. but when I did ctrl+space
on the error it disappeared anyway.
It might have something to do with setting "isolatedModules": true
in tsconfig.jsson
but I haven't checked removing them as my atom editor doesn't show the error anymore. I use the typescript plugin for atom, it auto compiles files using the tsconfig
on the fly so thats nice
Well, if I remove the bracket around the imports name it works, so weird :
import { PagerConfig } from './blocks/config/uib-pager.config';
=> import PagerConfig from './blocks/config/uib-pager.config';
Ok I found out why. If we remove curly braces, it imports the export default thing
. If we add curly braces it will try to find the export with the name specified in curly braces. So if we want to use curly braces notation, we have to do export function AlertServiceConfig...
instead of adding export default AlertServiceConfig
at the bottom of the file.
Just tested it and it works (thanks to this link)
@deepu105 I can work on the util services (base64.service.ts
...)
@jhipster/developers @sendilkumarn @tapas4java guys should we use ng2 component router or should we use ui-router for ng2 https://github.com/ui-router/quickstart-ng2. Im leaning towards ui-router as it would be easier to migrate to.
@deepu105 With all the changes going on with ng2's component router, I tend to agree with you. It remains to be seen if ui-router is ready for primetime though.
As far as contributing to this branch, what's the best way? I checked out angular-2
and ran npm link
on the project. When I try to run yo jhipster
, it results in the following:
Welcome to the JHipster Generator v3.4.0
Application files will be generated in folder: /Users/mraible
______________________________________________________________________________
JHipster update available: 3.4.1 (current: 3.4.0)
Run npm install -g generator-jhipster to update.
______________________________________________________________________________
I tried running npm install -g generator-jhipster
, but that doesn't fix it. I tried running npm link generator-jhipster
in my generator-jhipster
directory, but I get the same error.
@mraible you can ignore it. I think till we complete the version will remain @3.4.0
@deepu105 is that correct ?
@deepu105 with all the changes we should go to ui-router till we clear all these
@mraible Its just a notification for end users and will appear as we are on an older branch. You can ignore it. checking out the angular-2
branch and doing an npm link
should be sufficient.
@deepu105 ui router also, we could migrate to component router after if it's necessary (a guy in conference telled us that even Google doesn't know if they will use ui-router or component router for ng2 final version)
Hi all,
I'm trying to test the angular-2 generator, but I'm getting some Typescript errors:
[12:14:27] Starting 'tscompile'...
src\mainwebapp\app\account\account.module.ts(1,1): error TS2304: Cannot find name 'angular'.
src\mainwebapp\app\account\account.state.ts(4,5): error TS2304: Cannot find name 'angular'.
src\mainwebapp\app\account\account.state.ts(8,17): error TS2339: Property '$inject' does not exist on type '($stateProvider: any) => void'.
Did I missed anything ?
@rockbird its WIP
Ok :)
We shouldn't do @Injectable
above a function, it's not allowed by Typescript (see here). @injectable
is only for classes, so we have to switch service to class before putting the annotation. I'm working on fixing this in admin module.
you are right. didnt notice that when reviewing
Thanks & Regards,
Deepu
On Mon, Jun 20, 2016 at 5:08 PM, William Marques [email protected]
wrote:
We shouldn't do @Injectable above a function, it's not allowed by
Typescript. @injectable is only for classes, so we have to switch service
to class before putting the annotation. I'm working on fixing this in admin
module.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-227088766,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF82dGzkGspxJs_xUKOrTNwlRXzN4ks5qNliZgaJpZM4Ipod9
.
@wmarques @sendilkumarn Are you talking about the 2.0 component router or the new new component router (3.0.0) which was a collaboration between the angular and ngrx/router people is finally the recommended one to use now.
http://victorsavkin.com/post/145672529346/angular-router
https://angular.io/docs/ts/latest/guide/router.html
I was talking about the 2.0 router, didn't know about this new one. If it's the recommended one, I'd go on with this :)
Little issue I saw : the CSS files are inject with a script
tag so they're not loaded anymore, seems to come from the inject.vendor
task in gulp.
Rc3.0 is released. https://github.com/angular/angular/blob/master/CHANGELOG.md
I think we can update
@campers :+1 We can use that.
Another issue, Typescript compilation is made twice in gulp, I checked the gulpfile and I couldn't fix this... :(
I fixed few issues.
There is some performance issues as well. for example seems like TranslationStorageProvider
is being run too many number of times as we can see the log again and again. It could be happening for other providers as well
For me tscompile
is running fine. what exact issue are you facing @wmarques ?
Another debug tool to add to your list - https://augury.angular.io/
I use IntelliJ and WebStorm. If Typescript is enabled in the Languages & Frameworks settings, the 3 files (ts, js, map) are collected together. There is a drop down arrow to expand to see js or map. It cleans things up nicely.
@deepu105 After a project generation gulp triggers tscompile
twice for me.
@rpoitras Thanks I'll check this out :)
Oh ok. Ill try to check that when I have time. But im in the process of
relocating and will have only limited time this week
Thanks & Regards,
Deepu
On Mon, Jun 27, 2016 at 4:10 PM, William Marques [email protected]
wrote:
@deepu105 https://github.com/deepu105 After a project generation gulp
triggers tscompile twice for me.
@rpoitras https://github.com/rpoitras Thanks I'll check this out :)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-228680211,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF49Y-jvB3K8ypP5OAqPOwj6C0MdUks5qP4WMgaJpZM4Ipod9
.
@deepu105 repeated log in translation is because Translation.Constants.ts
don't have any value in it.
Good catch :+1:
Thanks & Regards,
Deepu
On Mon, Jun 27, 2016 at 6:15 PM, Sendil Kumar N [email protected]
wrote:
@deepu105 https://github.com/deepu105 repeated log in translation is
because Translation.Constants.ts don't have any value in it.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-228706803,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF2mRHtsWnbNCHxxrOYxAL51vvIHtks5qP6LCgaJpZM4Ipod9
.
@deepu105 no probs, we have time for this :) I'll try to fix this too
@wmarques @sendilkumarn sorry guys have been bit busy.
@deepu105 no problem, hope your relocation is going fine :smile:
Some issues I encountered:
$state
so I don't know how to manage state transitions and get $stateParams
.@wmarques They are releasing an alpha soon, mostly by this week. But still datepicker and modal are not completed.
These two we used extensively. So I think we can wait and move to ng2-bootstrap
for $state and $stateParams, guess we have to see how the new router works
Oh ok didn't see that uiBootstrap will be updated, let's wait then
Ui router has a beta version for ng2 so we meed to look at that.
Thanks & regards,
Deepu
On 8 Jul 2016 14:53, "William Marques" [email protected] wrote:
Oh ok didn't see that uiBootstrap will be updated, let's wait then
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-231314958,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF8Sw_GfktoQMs52QfNM4p-iAaUAAks5qThcFgaJpZM4Ipod9
.
@deepu105 What should we do first? Change routing? Or keep updating services/controllers ?
I was about to say it. We should start routing first and then in parallel should update the controllers
Probably, have a file called app.routes.ts and every folder like admin / account should export corresponding routes and add those in app.routes.ts.
But again to do that we need to finish home component to start with
First we need to do a POC and see if the new router can replace what we
currently do with UI-Router, coz we use it for more than just routing. we
init modal windows in state configs and also have ROLE info and page title
info so if new router can provide all the functions then we can move to
that in parallel else we need to use ui-router for ng2 which is in beta or
find an alternate
Thanks & Regards,
Deepu
On Tue, Jul 12, 2016 at 6:41 PM, Sendil Kumar N [email protected]
wrote:
I was about to say it. We should start routing first and then in parallel
should update the controllersProbably, have a file called app.routes.ts and every folder like admin /
account should export corresponding routes and add those in app.routes.ts.But again to do that we need to finish home component to start with
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-232042385,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF-nJaTnSXB-KRiiAk8RSFbw_-Ln-ks5qU5KEgaJpZM4Ipod9
.
@deepu105 We can check authorities using guards. For modal state I'm checking this.
@sendilkumarn https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-232042385 Route nesting is describe in Milestone #3: The Crisis Center
@wmarques https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-232057716 same conclusion guards seems to be the new way to handle auth on angular side
@wmarques https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-231313225 I'm afraid material2 will be the de-facto / official graphical lib (already a subproject of http://material.angular.io website) going for angular-ui may be the path of least effort but in the long run...
@francisoud thanks for your advices, so we will probably go on with guards to manage client side authorities.
It's not surprising that Google is pushing "their" webdesign alongside with "their" client side framework. I like this design but it's probably too early to go on with Material as it is only in Alpha...
Moreover, people are more used to use Bootstrap than the Material lib so I would stay with the angular ui lib.
I have done material few times and its not as easy as bootstrap and to be
frank I didnt like the angular implementation of material design currently
its too complicated to use
Thanks & Regards,
Deepu
On Wed, Jul 13, 2016 at 8:55 PM, William Marques [email protected]
wrote:
@francisoud https://github.com/francisoud thanks for your advices, so
we will probably go on with guards to manage client side authorities.
It's not surprising that Google is pushing "their" webdesign alongside
with "their" client side framework. I like this design but it's probably
too early to go on with Material as it is only in Alpha...
Moreover, people are more used to use Bootstrap than the Material lib so I
would stay with the angular ui lib.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-232391013,
or mute the thread
https://github.com/notifications/unsubscribe/ABDlF3wsqRRANUQ75cmUqRJrwXYuvfIFks5qVQN_gaJpZM4Ipod9
.
I'm building an entity generator for Aurelia via aurelia-breeze and this northwind-materialize example ;)
Let me know if you are interested in helping out!
@kristianmandrup sorry we only concentrate on angular and our hands are full
@wmarques @sendilkumarn I think this is gonna take more time than we thought. Hope the angular plugins like i18n etc come up with a ng2 version soon so that we dont have to rewrite their pipes
Hello Guys, thanks for your hard work! Do you happen to have some estimate on when JHipster with Angular 2 will be available?
Nope
Thanks & regards,
Deepu
On 31 Jul 2016 14:46, "István" [email protected] wrote:
Hello Guys, thanks for your hard work! Do you happen to have some estimate
on when JHipster with Angular 2 will be available?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-236419729,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF3tCsYdoe_q7QTp-ETolC5fp493pks5qbGffgaJpZM4Ipod9
.
@deepu105 Agree with you and I hope also they will migrate asap. This plugin seems to be the "new" translate : https://github.com/ocombe/ng2-translate
And now they write article on RC4 -> RC5 migration lol https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html
Seems pretty big change and we have to change quite a few things. I am looking into it now.
Guys we cannot afford to keep on changing stuff when angular2 guys decide
to break stuff. May be we should wait for the release
Thanks & regards,
Deepu
On 10 Aug 2016 13:52, "Sendil Kumar N" [email protected] wrote:
Seems pretty big change and we have to change quite a few things. I am
looking into it now. 👍—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-238798261,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF5XkvLM1F0pkOmJdBbffaRG_qO_zks5qeYpDgaJpZM4Ipod9
.
That's not very big changes and we can still pursue migration of pages, there won't be breaking changes on core angular imo.
Indeed, that's not very serious work from the AngularJS team. They clearly don't have our standard when talking about a "release candidate".
It also proves my point to my many customers who are wondering why we still don't use AngularJS 2 yet!!
good night, any of you tell if already has some available thing angula 2 + jhipster to test or something? if you please, pass the url will be a pleasure to help test with the team
You can check out the angular2 branch and generate an app with that to
test. Check the contributing.md file for details of local setup
Thanks & regards,
Deepu
On 24 Aug 2016 04:54, "israeleriston" [email protected] wrote:
good night, any of you tell if already has some available thing angula 2 +
jhipster to test or something? if you please, pass the url will be a
pleasure to help test with the team—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-241911449,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF0aRETr8rPhqnoKj9UCQlUUTgc54ks5qi4EQgaJpZM4Ipod9
.
Good morning, I am unable to use the jhipster: client-2 to create the app and test the angle 2, can anyone help me? the error is this jhipster Error: client-2
You do not seem to have a generator with the name jhipster: client-2 installed.
You can see available generators with npm search yeoman-generator and Then install Them with npm install [name].
To see the 20 registered with the generators run yo '--help` option.
Did you follow contribution guidelines to setup a local jhipster instance
from the repo and did you checkout the angular2 branch before running it?
Thanks & regards,
Deepu
On 24 Aug 2016 21:21, "israeleriston" [email protected] wrote:
Good morning, I am unable to use the jhipster: client-2 to create the app
and test the angle 2, can anyone help me? the error is this jhipster Error:
client-2You do not seem to have a generator with the name jhipster: client-2
installed.
You can see available generators with npm search yeoman-generator and Then
install Them with npm install [name].
To see the 20 registered with the generators run yo '--help` option.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-242115228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1lkoqrSjlRIQmtfY9ASoRxw4qIkks5qjGhpgaJpZM4Ipod9
.
I just tried this and it works for me. Here’s the steps:
On Aug 24, 2016, at 10:06 PM, Deepu K Sasidharan [email protected] wrote:
Did you follow contribution guidelines to setup a local jhipster instance
from the repo and did you checkout the angular2 branch before running it?Thanks & regards,
DeepuOn 24 Aug 2016 21:21, "israeleriston" [email protected] wrote:
Good morning, I am unable to use the jhipster: client-2 to create the app
and test the angle 2, can anyone help me? the error is this jhipster Error:
client-2You do not seem to have a generator with the name jhipster: client-2
installed.
You can see available generators with npm search yeoman-generator and Then
install Them with npm install [name].
To see the 20 registered with the generators run yo '--help` option.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-242115228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1lkoqrSjlRIQmtfY9ASoRxw4qIkks5qjGhpgaJpZM4Ipod9
.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-242276085, or mute the thread https://github.com/notifications/unsubscribe-auth/AABF5G_F5iUrFtDuZJJAdxWRm-hUqsggks5qjRSqgaJpZM4Ipod9.
I think the clone command should be:
git clone https://github.com/jhipster/generator-jhipster.git -b angular-2 --single-branch
Yes, I believe you're right @gmarziou. BTW, I tried to merge master into this branch and get things working last night. I didn't have any luck. I can post the branch as a PR if anyone wants to take a look.
Hi Matt no need to merge to master now. Since all ng2 development is
happening in a unique sub generator I would like to merge once everything
is ready
Anybody who wants to test it should just pull the repo and checkout the
angular2 branch and run npm link on it
Thanks & regards,
Deepu
On 26 Aug 2016 01:41, "Matt Raible" [email protected] wrote:
Yes, I believe you're right @gmarziou https://github.com/gmarziou. BTW,
I tried to merge master into this branch and get things working last night.
I didn't have any luck. I can post the branch as a PR if anyone wants to
take a look.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-242520664,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF6IsaIpMfgBpBr5LXbmefm1BMtm3ks5qjfbAgaJpZM4Ipod9
.
the angular2
branch is now partly working, have fixed few issues
It works for me for the default configuration choices. First time, you should execute also "npm install typings -global" in order to be able to run typings.
@dimeros typings
should be installed when npm install
runs as its part of the package.json
so it should happen automatically
@jhipster/developers can some body check the branch and see if ui-router and ui-bootstrap works for you guys?
ui-router no
ui-bootstrap most of the components seems to be broken.
Think we can migrate to ng-bootstrap now things are quite stable. I will migrate if everyone is okay.
@sendilkumarn yes I would like to switch to ng-bootstrap (which means we will be using bootstrap 4 as well) but its still in alpha so unless they release the plugin along side ng2 release we might end up using alpha/beta versions when we release the feature, which is ok as long as we are on BETA for ng2. Only problem is that it would make us dependent on them to remove our BETA label for ng2 support. @sendilkumarn since you are contributor for ng-bootstrap as well do you have any insight on when there would be a release?
Personally I would love to switch to ng-bootsrap @jdubois @wmarques what do you guys think?
@deepu105 looks good to me
Hello,
I am trying to use the generator for angular 2. When i generate the project using the ang 2 client, i get this error :
Client app generated successfully.
[15:19:26] Using gulpfile E:\projects\pers\smm\teste\jhipster-ang2\ang2_t1\gulpfile.js
[15:19:26] Starting 'clean'...
[15:19:26] Finished 'clean' after 5.88 ms
[15:19:26] Starting 'install'...
[15:19:26] Starting 'copy:temp'...
[15:19:26] Finished 'install' after 13 ms
[15:19:39] Finished 'copy:temp' after 13 s
[15:19:39] Starting 'inject:test'...
[15:19:39] Starting 'inject:vendor'...
[15:19:39] Starting 'ngconstant:dev'...
[15:19:39] Starting 'copy:deps'...
[15:19:39] Finished 'ngconstant:dev' after 192 ms
[15:19:40] gulp-inject 24 files into karma.conf.js.
[15:19:40] gulp-inject 25 files into index.html.
[15:19:40] Finished 'inject:test' after 563 ms
[15:19:40] Finished 'inject:vendor' after 516 ms
[15:19:40] Starting 'inject:dep'...
[15:19:40] Finished 'inject:dep' after 19 μs
[15:19:48] Finished 'copy:deps' after 8.43 s
[15:19:48] Starting 'copy:languages'...
[15:19:48] Finished 'copy:languages' after 13 ms
[15:19:48] Starting 'tscompile'...
src\mainwebapp\app\admin\tracker\tracker.controller.ts(33,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
src\mainwebapp\app\admin\tracker\tracker.controller.ts(39,1): error TS1128: Declaration or statement expected.
[15:19:52] TypeScript: 2 syntax errors
[15:19:52] TypeScript: emit succeeded (with errors)
[15:19:54] Finished 'tscompile' after 6.16 s
[15:19:54] Starting 'inject:troubleshoot'...
[15:19:54] gulp-inject 1 files into index.html.
[15:19:54] Finished 'inject:troubleshoot' after 20 ms
And also, as for your knowledge, is there any problem upgrading to angular 2 RC5?
Thx
This is a WIP so you are welcome to PR any fixes you find. Im findings few
new issues after RC5 yes.
Thanks & regards,
Deepu
On 1 Sep 2016 17:57, "Daniel P." [email protected] wrote:
Hello,
I am trying to use the generator for angular 2. When i generate the
project using the ang 2 client, i get this error :Client app generated successfully.
[15:19:26] Using gulpfile E:\projects\pers\smm\teste\
jhipster-ang2\ang2_t1\gulpfile.js
[15:19:26] Starting 'clean'...
[15:19:26] Finished 'clean' after 5.88 ms
[15:19:26] Starting 'install'...
[15:19:26] Starting 'copy:temp'...
[15:19:26] Finished 'install' after 13 ms
[15:19:39] Finished 'copy:temp' after 13 s
[15:19:39] Starting 'inject:test'...
[15:19:39] Starting 'inject:vendor'...
[15:19:39] Starting 'ngconstant:dev'...
[15:19:39] Starting 'copy:deps'...
[15:19:39] Finished 'ngconstant:dev' after 192 ms
[15:19:40] gulp-inject 24 files into karma.conf.js.
[15:19:40] gulp-inject 25 files into index.html.
[15:19:40] Finished 'inject:test' after 563 ms
[15:19:40] Finished 'inject:vendor' after 516 ms
[15:19:40] Starting 'inject:dep'...
[15:19:40] Finished 'inject:dep' after 19 μs
[15:19:48] Finished 'copy:deps' after 8.43 s
[15:19:48] Starting 'copy:languages'...
[15:19:48] Finished 'copy:languages' after 13 ms
[15:19:48] Starting 'tscompile'...
src\mainwebapp\app\admin\tracker\tracker.controller.ts(33,5): error
TS1068: Unexpected token. A constructor, method, accessor, or property was
expected.
src\mainwebapp\app\admin\tracker\tracker.controller.ts(39,1): error
TS1128: Declaration or statement expected.
[15:19:52] TypeScript: 2 syntax errors
[15:19:52] TypeScript: emit succeeded (with errors)
[15:19:54] Finished 'tscompile' after 6.16 s
[15:19:54] Starting 'inject:troubleshoot'...
[15:19:54] gulp-inject 1 files into index.html.
[15:19:54] Finished 'inject:troubleshoot' after 20 msAnd also, as for your knowledge, is there any problem upgrading to angular
2 RC5?Thx
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-244063122,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF-Un0kEI9T_Cd4Dd5NoTQQxNwGZBks5qlsSbgaJpZM4Ipod9
.
@deepu105 didn't they say that any app that runs on rc4 will run on rc5 for sure. what was the issue ?
But if we are moving to Rc5 then we have to adapt to modules and rc6 is also around the corner.
can we target to complete rc5 ASAP. Once that is done we will apply ng-bootstrap on top of that what say ?
@sendilkumarn rc6 is already out, released 24 hours ago.
Lets go to rc6 directly. Sorry I didn't try rc5, i was talking about rc4
and the ui bootstrap issue.
@sendilkumarn for ng-bootstrap I need concurrence from @jdubois and
@wmarques as well
Thanks & regards,
Deepu
On 2 Sep 2016 05:15, "Otabek" [email protected] wrote:
@sendilkumarn https://github.com/sendilkumarn rc6 is already out,
released 24 hours ago.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-244245487,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlFwnUDM46QCIsKxN97jgYkyuHzWWEks5ql2OZgaJpZM4Ipod9
.
Ok @jdubois has given concurrence already @wmarques if you have no issues
lets switch to ng-bootstrap. It lacks the datepicker component for now, but
I guess we need it only for the entity and can wait
Thanks & regards,
Deepu
On 2 Sep 2016 08:14, "Deepu K Sasidharan" [email protected] wrote:
Lets go to rc6 directly. Sorry I didn't try rc5, i was talking about rc4
and the ui bootstrap issue.@sendilkumarn for ng-bootstrap I need concurrence from @jdubois and
@wmarques as wellThanks & regards,
DeepuOn 2 Sep 2016 05:15, "Otabek" [email protected] wrote:
@sendilkumarn https://github.com/sendilkumarn rc6 is already out,
released 24 hours ago.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-244245487,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlFwnUDM46QCIsKxN97jgYkyuHzWWEks5ql2OZgaJpZM4Ipod9
.
Cool rc6 first then ng-bootstrap.
Is anybody doing RC6 update? else ill try to do it tonight
Migrating to RC6 broke our app 😭
This is really irritating, they keep changing stuff around in between RC's
Looks like there are lot of breaking changes in rc5 and rc6, seems will take some time to fully finish the upgrade. I'll try to close it by this week.
In the mean time @040796 (Please consider using a better username, its difficult to remember) can you start with the below items in the angular-2 branch?
Ok i will start next week.
I believe i can't change the username but i added my full name in my GitHub profile. Sorry for the inconvenience.
@040796 you can change username. check the account section in profile settings
Thanks, it's done.
@flaviencathala much better. Now i feel like talking to a human 😉
@sendilkumarn you can try to switch to ng-bootstrap if you want
@deepu105 on a roll
@jhipster/hipsters as you can see in the checklist here we have lot more to migrate to get ng2 support out soon. Currently only myself, @wmarques and @sendilkumarn are working on this mainly, I would love to have more hands on this. So I'm calling out to you guys to see if anyone can help with this.
@deepu105 I love to help, but the baby hipster demands his time :) But I try to have a look at smaller tasks.
@deepu105 about the last item
After RC6 update: This app works for now. But we have an issue. If we use multiple @NgModule like how I have defined for now, then we are not able to use the common pipes and directives across these, seems like app doesnt load if I declare a pipe in more than one module. we need to find a solution for this or we need to stick to just a single huge module for the entire app(Which is ugly)
In the doc it is specified that
Components, directives and pipes belong to one module — and one module only.
Never re-declare classes that belong to another module.
To solve your prolems you will need to declare a _APPNAMESharedModule_ and declare it inside all feature module that need those pipes.
Something like:
@NgModule({
imports: [CommonModule],
declarations: [
FilterPipe,
OrderByPipe,
TranslatePipe
],
exports: [
FilterPipe,
OrderByPipe,
TranslatePipe
]
})
export class <%=angular2AppName%>SharedModule {}
@tgillieron thanks for the tip. ill try that and update
@tgillieron thanks a ton. It works 👍
@dimeros seems like you are right about having to install typings
with -g
Guys if anybody is gonna start working on anything please do comment here before you start so that there is no duplicate work done
@wmarques @sendilkumarn @mraible what do you guys think of https://github.com/angular-redux/ng-redux should we try to use it here?
Why do we need ng-redux? What does it make easier? It doesn't look
intuitive at first glance. Is it a replacement for RxJS?
On Fri, Sep 9, 2016 at 11:18 Deepu K Sasidharan [email protected]
wrote:
@wmarques https://github.com/wmarques @sendilkumarn
https://github.com/sendilkumarn @mraible https://github.com/mraible
what do you guys think of https://github.com/angular-redux/ng-redux
should we try to use it here?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-245995777,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABF5PYQP68mnR4zgOYrL24F6SDmmKPYks5qoaLigaJpZM4Ipod9
.
@mraible I'm not very familiar with Redux as well but it seems to be the next big thing in the React/ng2 world so thought you guys would know about it. I dont think its a replacement for RxJs its suppose to compliment it
I'm aware of it, but haven't used it on a project so don't really have an
opinion.
On Fri, Sep 9, 2016 at 11:34 Deepu K Sasidharan [email protected]
wrote:
@mraible https://github.com/mraible I'm not very familiar with Redux
https://github.com/reactjs/redux as well but it seems to be the next
big thing in the React/ng2 world so thought you guys would know about it. I
dont think its a replacement for RxJs its suppose to compliment it—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-246000318,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABF5FYs5krS0FyG7bLMngYeBpEhK_Rfks5qoaa8gaJpZM4Ipod9
.
I'm working on this experiment with ng2-redux. I used this starter from rangle.io to get it going.
Redux (Reduce + Flux) is for immutable state management which is different from the observables functionality provided by RxJS (Reactive + JavaScript).
A couple of cool things about this. You can learn more in this video
The reason the name "Redux" is part "Reduce" is because like .reduce() in JavaScript, it takes a set of things one after another and accumulates their impact onto a single thing, the store. I was confused about that for a while. The "Flux" part is because all changes are unidirectional. They happen through dispatched actions which change the store which then change the view.
I'm not an expert so that's about as much as I can say. So far it hasn't been intuitive and I get stuck for long times on things I think should be simple, but I can see the long term payoff for big applications. I think the main problem is limited documentation, examples and people to answer questions right away, compared to something like Angular. There are new concepts and it's hard to tell where to put different types of code - in actions, reducers, epics, services, initializers and so on. I think that there is potential for very good opinionatedness about it all but it just isn't clear to me at the moment.
I claimed the sessions and settings pages to get started.
ng2-redux (and redux in general) does not replace RxJS. Here's a fairly good comparison. You certainly _could_ implement the core redux functionality in Rx, but doing so would mean you'd miss out on redux middleware, devtools, community, etc so I don't advise it. You don't really _gain_ anything by reinventing the wheel.
If you want to use Rx to manage side effects in redux, you can use redux-observable which is a middleware for redux (works with ng2-redux) that helps you do just that.
This is fairly advanced, bleeding edge stuff though. It's asking a lot for beginners that are not familiar with Rx, redux, and what side effects _are_. That said, if you're users are in fact heavy Rx people, it will prolly be extremely attractive. General advice is don't add abstractions until it's clear you need them or you're already familiar with them. e.g. if you want to use redux but don't want to use Rx for side effects, you can use redux-thunk which is much easier to learn, at the expense of being limited; true cancellation, debounce, and other complex management is either not possible or tough/hacky.
/I'm not familiar with what jhipster is for or does, so keep that in mind.
The ngrx project is very interesting. They have a redux implementation - https://github.com/ngrx/store. I have been using it on several angular 2 projects and really liked it. If looking to include a redux style state management (which I think is a great idea), this would be a project worth considering.
ok this branch has been rebased to master. ufff it was tough 😭 but atleast now the tests should pass
For router
. We can add in router temporarily in ng2modules
defined. It works.
Then we can move them into a separate file. will that be okay ?
I will start with admin module if that is okay.
I'm starting Components:login
I'm also on Components:language
I wanted to give ui-router for ng2 a shot, its in beta I guess. Coz that
would be very easy for us to migrate to. Did you try ui-router ng2 version?
Thanks & regards,
Deepu
On 14 Sep 2016 13:55, "Flavien Cathala" [email protected] wrote:
I'm starting Components:login
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-246941359,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF0sKEmdlIuX9y4zyQvAB5_z7fVj7ks5qp6-DgaJpZM4Ipod9
.
Nope haven't tried it. give it a shot then.
Didn't try the new router.. I'm working on alerts but I'm running into a problem when I run the app after migrating the Alert Service : TypeError: Cannot read property 'injector' of null
Have you got this error before ? I inject it correctly in both common.module (using downgradeng2provider) and common.ng2module (in providers array) and my service has no errors..
My commits are here if you want to check.
@wmarques Not sure but might have something to do with AlertService being a provider. we havent properly migrated it to be ng2 yet. I couldnt find a clean way to migrate providers anywhere actually.
@deepu105 That's what I thought but what I did is completely remove the "providers" stuff and now AlertService looks like another service so I don't know why the UpgradeAdapter can't downgrade this... It's just variables, constructor, and functions now.
Try removing it from ng2module?
@flaviencathala still working on login? Try to add in ngbModal.
@deepu105 I'll try this :)
BTW, hello Angular 2 : http://angularjs.blogspot.fr/2016/09/angular2-final.html
EDIT : Removing it from ng2module still gives me the same error. Maybe I can PR this and say that is a "tracking PR" for the alert migration ?
and its upgraded to latest release 😄
Nice ! I'm stuck on this error... I'm going to PR this if you guys can check if there is no dumb error I made.
@wmarques seems like if I remove the AlertService
injection from NotificationInterceptor
this error dissapears but then there are other errors from the alert components
do this
NotificationInterceptor.$inject = ['$q'];
export function NotificationInterceptor ($q) {
var service = {
response: response
};
return service;
function response (response) {
var alertKey = response.headers('X-angular2App-alert');
if (angular.isString(alertKey)) {
//AlertService.success(alertKey, { param : response.headers('X-angular2App-params')});
}
return response;
}
}
is the app broken ?
Yes, coz of the alert service issue
Thanks & regards,
Deepu
On 16 Sep 2016 11:29, "Sendil Kumar N" [email protected] wrote:
is the app broken ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-247524397,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF6wuF0gtzdb2jay-CBjnmnmTG1tcks5qqjBHgaJpZM4Ipod9
.
@deepu105 thanks I'll try this, maybe the Interceptor is awaiting for a provider and not a factory but that seems strange...
Ok I did this, it should work but now I'm having another error since yesterday on every project I generate with Angular2 even before you merged the Alert migration... Here is the error: Error: XHR error (404 Not Found) loading http://localhost:8080/traceur
I investigated and it seems to come from the systemJS config but I don't understand why it worked before and works on your computers and not on mine...
EDIT : ok it was coming from this, I'm fixing this.
Try to rebase to the latest angular2 branch. There was an error from
document toot setting. I have fixed it
Thanks & regards,
Deepu
On 16 Sep 2016 13:47, "William Marques" [email protected] wrote:
Ok I did this, it should work but now I'm having another error since
yesterday on every project I generate with Angular2 even before you merged
the Alert migration... Here is the error: Error: XHR error (404 Not
Found) loading http://localhost:8080/traceur
I investigated and it seems to come from the systemJS config but I don't
understand why it worked before and works on your computers and not on
mine...—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-247544294,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF72b5aVQcRpZdOfKHaFjqPmdIKyxks5qqlCYgaJpZM4Ipod9
.
@wmarques refer the changelog too in ng-bootstrap.
@sendilkumarn yep I fixed this, I'm checking if the app works and I'll PR this
Are there any specific instructions to run the app? Before ngMonthPicker issue broke the project, I could not use any of the links in the navbar and I could not directly navigate to any states via URL. I can get gulp to compile the TS with the server started in another tab, but can't go anywhere except the home state.
I think I have the settings and session pages ready to go, but I'd like to test them.
John, UI router is broken so the only way to navigate to a state is
manually typing in the url for the route.
Thanks & regards,
Deepu
On 17 Sep 2016 08:39, "Jon Ruddell" [email protected] wrote:
Are there any specific instructions to run the app? Before ngMonthPicker
issue broke the project, I could not use any of the links in the navbar and
I could not directly navigate to any states via URL. I can get gulp to
compile the TS with the server started in another tab, but can't go
anywhere except the home state.I think I have the settings and session pages ready to go, but I'd like to
test them.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-247745816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1jqegGsK_XDgqJ_NzWkEGGn_ehIks5qq1nmgaJpZM4Ipod9
.
If you are still having issue, you PR your changes anyway, ill try to test
and review
Thanks & regards,
Deepu
On 17 Sep 2016 10:00, "Deepu K Sasidharan" [email protected] wrote:
John, UI router is broken so the only way to navigate to a state is
manually typing in the url for the route.Thanks & regards,
DeepuOn 17 Sep 2016 08:39, "Jon Ruddell" [email protected] wrote:
Are there any specific instructions to run the app? Before ngMonthPicker
issue broke the project, I could not use any of the links in the navbar and
I could not directly navigate to any states via URL. I can get gulp to
compile the TS with the server started in another tab, but can't go
anywhere except the home state.I think I have the settings and session pages ready to go, but I'd like
to test them.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-247745816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1jqegGsK_XDgqJ_NzWkEGGn_ehIks5qq1nmgaJpZM4Ipod9
.
@wmarques @ruddell @sendilkumarn plz check the branch now. it should be working. I have pushed a fix
@wmarques @flaviencathala I'm unmarking the account:module items as the services are not migrated to ng2 in those yet. please mark them complete once the services are migrated
@deepu105 it is not working.. Is it for you ?
@sendilkumarn yes the app works
@deepu105 I have a traceur error with the ngb-alert module that couldn't be found, @flaviencathala has the same error, I'm checking this.
EDIT: It probably comes from the SystemJS config. We do not declare each module independantly so when we try to import the NgbAlert module for example, SystemJS can't find it.
same error here @wmarques. it is because of systemjs + ng-bootstrap.
@wmarques @sendilkumarn could you check the latest branch code. Its working fine for me
Its strange. I do not get that error
I tried to migrate activate.service
but have kept it commented as I'm getting the same Injector undefined
error which @wmarques faced during alert.service
migration. Initially I thought this happens when we try to inject ng2 provider in the config/run phase but seems this time its happening from the injection in auth.service
I have no clue why.
Its strange. I do not get that error
Really !!! then it is strange. @wmarques have you found out any work around? In between @deepu105 you do use latest ng-bootstrap right ?
when we try to inject ng2 provider in the config/run phase
Few things to note
The race condition occurs while both angular1 and angular2 loads can also lead to this error. Try loading the run
once all the necessary providers are loaded.
Sometimes, for the very first load, auth
is not loaded. Can be because of that.
@sendilkumarn @deepu105 still having the same error with alert.module
and I couldn't find a work around.. If I import the whole NgbModule
the upgradeadapter throws me an error..
Maybe we should wait a full migration without ngbootstrap and then include ngbootstrap after ?
Or we can try to use WebPack instead of SystemJS which could fix the issue. angular-cli already switched to webpack btw
isn't angular-cli always in WebPack?
I am okay if we are moving for webpack.. But again lot of rework will be there.
@deepu105 your comments?
@sendilkumarn nope they were working with SystemJS but switched on Webpack recently. I don't know if that be alot of rework, I'll try to do a sample with Webpack when i have some time.
@wmarques my only worry is that webpack might not play well with gulp. But if you can get it working well with our gulp workflow then go ahead
@deepu105 I'm tryin I let you know
@sendilkumarn finally I was able to replicate the error you guys are facing. I still have no idea how it was working earlier for me. let me see if i can find a fix
@deepu105 Ok so I managed to switch to WebPack but I still get the ngbDatepickerMonthView
error from the upgradeadapter... Maybe we should post an issue on their repo ?
Btw I found pretty easy to setup WebPack from this seed project and it looks easier to use when adding 3rd party libraries. But as you said I don't know how to handle that with gulp. But at the end it will be nice to remove gulp and use only some npm scripts.
@wmarques I like webpack but I still dont like the idea of doing everything with npm
alone. its ugly, un readable and very difficult for beginners and intermediate developers who are our major users. Also our gulp build is very complex and doing all that in npm is very difficult and would require us to write external script files to do so, some of which are currently done using gulp plugins
Ok reverting back to use NgbModule
leaves me with same error you get ngbDatepickerMonthView
stuff. I think we should post an issue to them for this
btw I figured how it was working for me, the package.json
had 1.0.0-alpha.4
of ng-bootstrap and somehow my node_modules was not upgraded to 1.0.0-alpha.5
. so one way for us to temporarily get past this error is to downgrade to 1.0.0-alpha.4
what say @wmarques @sendilkumarn ?
so again we are blocked by this stupid issue https://github.com/angular/angular/issues/11280
downgrade to 1.0.0-alpha.4
yes we have to downgrade now and wait for this to come #729 which will be this weekend [ i guess based on the discussion ]. [IMO] This will really help us out since the individual entities will be exported from bundle itself.
@sendilkumarn that was an attempt to fix the traceur error. anyways I have downgraded to alpha.4 now so when you guys are working make sure to delete the @ng-bootstrap
in node_modules
and run npm i
to get back to the old version. its working for me
UI-Router guy here offering to help with any ui-router-ng2 issues.
I'm also a long time java developer (18years) so this project interests me!
I'm working towards a beta.3 release this week which will better address NgModule
s (bootstrapping and lazy loading).
Let me know how I can help.
@christopherthielen thank you. I started to integrate ui router ng2 but was kind of lost as I couldn't get the upgrade strategy working properly. So if you can help to migrate atleast a few of the routes it would be very helpful. I have already added it to the package.json and setup to copy it to the vendor folder and stuff.
I am going to start a project which should go in production in 3 months. Should I start with jhipster 4 or the earlier version? I really would like to go with ng2.. Is there any get started guide for version 4?
Thanks.
@otabekgb You should use the latest released version, which doesn't include Ng2 because we're still in the migration process. But you have angular-cli if you want some help to setup your frontend. You can also check the ng2 code in the angular-2 of this repo, but be aware that it's bugged and not finished.
Of course if you are interested, don't hesitate to contribute and help us bring the JHipster V4 asap ! :)
Guys I have updated to latest angular and ng-bootstrap versions to fix the attribute selector error. Now everything seems fine. Can you just check and confirm if things are working on your end as well?
@wmarques Thanks for the response. If I start with V3, how difficult is it to migrate to V4 later on when it is ready?
I started to integrate ui router ng2 but was kind of lost as I couldn't get the upgrade strategy working properly.
The upgrade strategy for hybrid ui-router apps can be found at https://github.com/ui-router/ng1-to-ng2
In a nutshell, the the app is hosted using ui-router for ng1.
Ng2 support is provided using an adapter. You can route directly to an ng1 or ng2 component in a state definition. The state definitions can be defined in either ng1 code or via an ng2 NgModule.
This provides a clean upgrade strategy since the ng2 modules are not aware they're in hybrid mode. Once all the ng1 code is gone, only the app bootstrap code has to change.
@christopherthielen yes i was trying to follow the repo you mentioned but somehow couldn't get ot to work. May its just me coz im just a beginner in ng2. Would love to have some contribution from you to get us started in this.
I'll submit a pr shortly
On Sun, Sep 25, 2016 at 10:04 PM Deepu K Sasidharan <
[email protected]> wrote:
@christopherthielen https://github.com/christopherthielen yes i was
trying to follow the repo you mentioned but somehow couldn't get ot to
work. May its just me coz im just a beginner in ng2. Would love to have
some contribution from you to get us started in this.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-249469836,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB9VZmUdcPSNOVvertmAXa97HClUgKmLks5qtzZGgaJpZM4Ipod9
.
PR #4220
@deepu105 @sendilkumarn I'm facing the following error: "TypeError: Cannot read property 'injector' of null" for the migration of the login service. Did you guys found a solution ?
@flaviencathala think you missed something in login service. I had similar error when I injected something in the class and not initialised properly.
PR the code or update in your repo lets have a look?
I fixed it by commenting some calls of login service in not migrated components. We'll see once it will be migrated if we still face the problem.
@flaviencathala I saw that same error when upgrading my ng2-demo app to Angular 2. It turned out to be caused by imports and only happened for tests. Here's the commit that fixed it: https://github.com/mraible/ng2-demo/pull/4/commits/7cea8781016f55c9a290364da6c7a6c4999f405a
"TypeError: Cannot read property 'injector' of null"
When you bootstrap an ngUpgrade app, the ng1 injector is built first, then the ng2 injector. After ng2 injector is created, it (and any downgraded ng2 providers) is only then added to the ng1 injector.
In ng1, if you try to inject something from ng2 before ng2 creation injector is finished, you will get this error.
@flaviencathala @wmarques @sendilkumarn lets just convert all the services to ng2 first then. ill start with _account.service
and _principal.service
can some one do the auth*
services?
@deepu105 I don't have much time to migrate right now but I'll do some code reviews on pull requests about ng2 ;)
@christopherthielen the ui-router visulaizer is super cool. thanks for adding that
@jhipster/developers check this out
Awesome !
the ui-router visulaizer is super cool. thanks for adding that
Yeah no problem! It works on any ui-router 1.0+, so you can add it to the ng1 generator as well. It even works with ui-router-react #2608. (In fact, the visualizer is a React app!)
Here's the repo: https://github.com/ui-router/visualizer
That was mentioned during the hackathon ! I was going to show it ! Thanks @christopherthielen that's a really cool feature that will help us debugging route problems :smile:
@jhipster/developers guys the auth services are migrated. we have only few more modules left.
Now comes the hard part migrating run, config and interceptor blocks. Does anyone have an idea how to go about it? else i need do some research and see what can be done.
"TypeError: Cannot read property 'injector' of null"
I now remember that this error can also happen when the ng2 bootstrap silently fails.
ngUpgrade will throw an exception when components can't be compiled, etc, but in many cases the errors are _not sent to the console_.
To debug these, check if the .ready()
callback in app.main.ts
was called or not. If it was not called, you may need to trace the _bootstrapModuleWithZone
code in core.umd.ts
which is called by the ng2 ngUpgrade adapter.
Another way is to breakpoint on resolvePromise
code in zone.js
. When the exception is thrown in a promise, it is rethrown as "Uncaught (in promise)". Place a breakpoint in zone.js
and you can print out the value.stack
to find the root cause.
Follow this issue: https://github.com/angular/angular/issues/11977
@christopherthielen thanks for the detailed info. I have started to feel that ng1 errors were better and easier to trace than ng2 :(
The Angular2 branch client side code is failing to compile with JWT authentication token. Below is error of gulp build
src/main/webapp/app/components/auth/auth-jwt.service.ts(41,20): error TS2346: Supplied parameters do not match any signature of call target.
src/main/webapp/app/components/auth/auth-jwt.service.ts(53,16): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
src/main/webapp/app/components/auth/auth.service.ts(5,36): error TS2307: Cannot find module './auth-session.service'
If you move the auth.service.ts from a session based authentication then it throw error that logintoken not found (obviously).
Yes those options are not tested yet. This is a WIP. If you are able to
solve the error please PR a fix or comments with a solution.
I need to complete migration for the default options and get it working
before I start testing other combos
Thanks & regards,
Deepu
On 5 Oct 2016 06:29, "Allahbaksh Mohammedali Asadullah" <
[email protected]> wrote:
The Angular2 branch client side code is failing to compile with JWT
authentication token. Below is error of gulp build
src/main/webapp/app/components/auth/auth-jwt.service.ts(41,20): error
TS2346: Supplied parameters do not match any signature of call target.
src/main/webapp/app/components/auth/auth-jwt.service.ts(53,16): error
TS2355: A function whose declared type is neither 'void' nor 'any' must
return a value.
src/main/webapp/app/components/auth/auth.service.ts(5,36): error TS2307:
Cannot find module './auth-session.service'
If you move the auth.service.ts from a session based authentication then it
throw error that logintoken not found (obviously).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-251555926,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF8YpE_P3BPyXT9dDMIYHuwgmAh3Eks5qwvZ0gaJpZM4Ipod9
.
@flaviencathala can you migrate the social module under accounts please?
@deepu105 Ok i'm on it.
@deepu105 about interceptors, this should be a good way to handle this IMHO.
@wmarques yes I was thinking of the same until angular supports it. But no idea about run and config phase stuff yet
Guys, have you looked at auth0? One of my colleagues has used it successfully with angular2 and jhipster JWT based gateway
https://github.com/auth0-samples/auth0-angularjs2-systemjs-sample
I've heard of auth0, it's a competitor to my new company, Stormpath. ;)
I'm starting to develop a Stormpath module for JHipster this week. I'm also
tasked with finishing Stormpath's Angular 2 SDK. One that's finished (and
JHipster has Angular 2 support), I hope to create another module.
Of course, it'd be cool to see an auth0 module as well! Don't know if I can
get paid to write it though.
On Wed, Oct 5, 2016 at 05:32 Gaël Marziou [email protected] wrote:
Guys, have you looked at auth0, one of my collegaues has been using it
sucessfully with angular2 and jhipster JWT based gatewayhttps://github.com/auth0-samples/auth0-angularjs2-systemjs-sample
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-251660994,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABF5LqxuWdXB779HMxnnz6LfUf_mQoaks5qw5jLgaJpZM4Ipod9
.
.config/.run blocks:
| name | what it do | replacement |
| --- | --- | --- |
| .config(CompileServiceConfig)
| enables production mode | enableProdMode (bootstrap) |
| .config(HttpConfig)
| Register HTTP Interceptors | wmarques suggestion |
| .config(HttpConfig)
| Enable CSRF | ???? ng2 support? |
| .config(HttpConfig)
| otherwise('/');
| UIRouterModule.forRoot() |
| .config(HttpConfig)
| boolean type | UIRouterModule.forRoot() |
| .config(LocalStorageConfig)
| local storage config | ???? ng2 support? |
| .config(PagerConfig)
| configure uibs pager | ???? ng2 support? |
| .config(PaginationConfig)
| configure uibs pagination | ???? ng2 support? |
| .config(UIRouterDeferInterceptConfig)
| router defer | not necessary |
| .config(TranslationConfig)
| configure translation | ???? ng2 support? |
| .run(run)
| register router hooks | UIRouterModule.forRoot() |
| .run(run)
| router tracing and visualizer | UIRouterModule.forRoot() |
| .run(run)
| translate window title | ???? ng2 support? |
| .config(UserMgmntStateConfig)
| register admin states | UIRouterModule.forChild() |
| .config(AlertServiceConfig)
| alerts as toasts | ???? ng2 support? |
| .config(stateConfig)
| register entity
router state | UIRouterModule.forChild() |
Thanks Chris :)
Thanks & regards,
Deepu
On 5 Oct 2016 23:07, "Chris Thielen" [email protected] wrote:
.config/.run blocks:
name what it do replacement
.config(CompileServiceConfig) enables production mode enableProdMode
https://angular.io/docs/ts/latest/api/core/index/enableProdMode-function.html
(bootstrap)
.config(HttpConfig) Register Interceptors wmarques suggestion
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-251618909
.config(HttpConfig) Enable CSRF ???? ng2 support?
.config('HttpConfig) otherwise('/'); UIRouterModule.forRoot()
https://ui-router.github.io/docs/latest/interfaces/ng2.rootmodule.html#otherwise
.config(HttpConfig) boolean type UIRouterModule.forRoot()
https://ui-router.github.io/docs/latest/interfaces/ng2.rootmodule.html#configclass
.config(LocalStorageConfig) local storage config ???? ng2 support?
.config(PagerConfig) configure uibs pager ???? ng2 support?
.config(PaginationConfig) configure ubs pagination ???? ng2 support?
.config(UIRouterDeferInterceptConfig) router defer not necessary
.config(TranslationConfig) configure translation ???? ng2 support?
.run(run) register router hooks UIRouterModule.forRoot()
https://ui-router.github.io/docs/latest/interfaces/ng2.rootmodule.html#configclass
.run(run) router tracing and visualizer UIRouterModule.forRoot()
https://ui-router.github.io/docs/latest/interfaces/ng2.rootmodule.html#configclass
.run(run) translate window title ???? ng2 support?
.config(UserMgmntStateConfig) register admin states
UIRouterModule.forChild()
https://ui-router.github.io/docs/latest/interfaces/ng2.statesmodule.html#states
.config(AlertServiceConfig) alerts as toasts ???? ng2 support?
.config(stateConfig) register entity router state
UIRouterModule.forChild()
https://ui-router.github.io/docs/latest/interfaces/ng2.statesmodule.html#states—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-251744593,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF8s-0IK2ApKBOzRvynHy_U1WcC5Xks5qw-BbgaJpZM4Ipod9
.
Btw we need more ng2 experts like you @christopherthielen
Thank you so much @christopherthielen , you're saving A LOT of time for us :smile:
About the AlertService config, maybe we could use this. This seems to correspond to what we need to do :)
@wmarques or we can try something from this as well https://angular.io/docs/ts/latest/guide/dependency-injection.html#!#providers
@deepu105 that's the same thing apparently so yes, let's use providers
@jhipster/developers the angular2 folder structure has been refactored with https://github.com/jhipster/generator-jhipster/pull/4262 there is no more components
folder, all shared components have been moved to the shared
folder and are re-exported from there. This will make importing these in other places easier and will avoid circular dependencies.
@flaviencathala this should help you with the social migration. social-register stuff can be in accounts, but social-login stuff needs to be moved into shared/login
folder I guess
@deepu105 very good ! It starts looking good :smile:
I guess we are almost nearing completion of module migration. Now is the
tough task, removing angular 1 and its dependencies and finding ng2
equivalents
Thanks & Regards,
Deepu
On Fri, Oct 7, 2016 at 1:29 PM, William Marques [email protected]
wrote:
@deepu105 https://github.com/deepu105 very good ! It starts looking
good 😄—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-252177105,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF4--wcDUNsGcmyB2GxpmHjlDD2ILks5qxfv7gaJpZM4Ipod9
.
@ruddell do you need help with the user-management screens?
I opened #4300, still needs a little work on pagination/sorting but looking good.
@deepu105 I have tried small for JWT authentication. Earlier the code was not compiling because of presence of TrackerService and also return type signature in _auth-jwt.service.ts. I have submitted a PR #4298.
@deepu105 Are we moving away from Bower. If yes I would like to try it out. Do you have any suggestions. I just tried https://www.npmjs.com/package/bower-migrate.
@allahbaksh yes we are, the final goal is to drop bower to manage all the dependencies with NPM, which is the de-facto workflow for Angular2 projects. One other difficulty will be mixing Gulp with SystemJS workflow.
Since angular cli was migrated to webpack shouldnt we do the same.
@fmatuszewski Yes if we can find a good way to do all that we do with our current gulp workflow
+1 for webpack, I tried it and I easily switched on. I don't know what are the deep changes to be honest but one big advantage I saw is that you don't have to add somes config lines when you add a 3rd party lib like ng-bootstrap, you just import the module and it works.
@deepu105 https://webpack.github.io/docs/usage-with-gulp.html
@wmarques can you create a branch angular2-webpack
from current angular2 branch and commit your work on this there. We can parellely see how we can work on that and merge it here once we are satisfied
@deepu105 I did this some weeks ago and not on the computer that I use for work, I should have committed this :cry:
@deepu105 I'm starting this, I'll try to work on it in the next week but you can already check what it's done on my branch. I'm basing my work on this repo
Also, maybe we can add a question to let the user choose his module loader and set webpack by default? If it's not to hard to maintain.
Not sure, lets see how it works first. It might be too much work to
maintain both without much gain
Thanks & regards,
Deepu
On 14 Oct 2016 20:43, "William Marques" [email protected] wrote:
@deepu105 https://github.com/deepu105 I'm starting this, I'll try to
work on it in the next week but you can already check what it's done. I'm
basing my work on this repo https://github.com/angular/angular2-seedAlso, maybe we can add a question to let the user choose his module loader
and set webpack by default? If it's not to hard to maintain.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-253830338,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF-TsVRK05gFYCdhI9hMy0H9naIJEks5qz5wDgaJpZM4Ipod9
.
There is gulp plugin for webpack so we can keep it and add web pack for what is needed. Transplitter minification source maps are easy in webpack.
Did you hear about angular metadate https://hotell.gitbooks.io/ng-metadata/content/
I dont want to try another lib. we are already almost done so no point
trying this now.
Thanks & Regards,
Deepu
On Mon, Oct 17, 2016 at 12:30 PM, Filip [email protected] wrote:
Did you hear about angular metadate https://hotell.gitbooks.io/ng-
metadata/content/—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-254127717,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlFyLXF2Fd6tGwVwR1_09gHlrymzUaks5q0x0jgaJpZM4Ipod9
.
Hey all,
I was preparing a little tech demo for scrum meeting using the angular2 branch and stucked on all the UAA stuff. As I see, there wasn't a lot of work done on this integration. If it's ok, I will revisit this part this week an fix it, so it work as it does for ng1.
A brief update on this: I started working on this a few days ago, and it seems to all of our ng1 http interceptors aren't working anymore. Until yet I only managed it to build a one time request interceptor using BaseRequestOptions
and looking for a per-request way to go.
Will report, when I get more results
About the performance issues @deepu105 mentioned, maybe they are due to the hybrid app, I guess performances will be better when we will drop all ng1 features to move to a fully ng2 app.
Yes it could be due to hybrid app, means its unusable for any production
grade app for now
Thanks & regards,
Deepu
On 26 Oct 2016 13:24, "William Marques" [email protected] wrote:
About the performance issues @deepu105 https://github.com/deepu105
mentioned, maybe they are due to the hybrid app, I guess performances will
be better when we will drop all ng1 features to move to a fully ng2 app.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-256275297,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF8R3GoEfWLEU7QdksCKpPHoIN1hoks5q3wcogaJpZM4Ipod9
.
Hey we would be happy to assist you with any webpack migration or support. Please let us know where we (the webpack org) can help out if needed.
@TheLarkInn you are everywhere
@TheLarkInn thank you for coming forward. yes we would appreciate any help possible here.
To be frank we started with systemJS since ng2 guys were using it and now they have switched to webpack. We are trying to keep our code as much compatible to Angular CLI as possible.
We currently use Gulp for our complex production build and browsersyc pipe line. See here https://github.com/jhipster/generator-jhipster/blob/angular-2/generators/client-2/templates/_gulpfile.js
Hence it would be helpful if you guys can suggest how far webpack can be used to replace/compliment these workflows. And we will be more than happy if you guys choose to PR things yourself as well 😄
We are webpack newbies FYI
@christopherthielen @TheLarkInn its really nice of you guys coming forward to help the JHipster community. we are definitely Ng2 newbies and would love more expert help
@TheLarkInn Just saw that you are on core Angular CLI team as well hence we would be grateful if you can review our code and suggest what we can do to make it more compatible with the Angular CLI as well
@TheLarkInn you are everywhere
@christopherthielen Funny story, I happened to actually learn about JHipster today at work. Being a large financial F500 company, there are a lot of Java systems, and I was charged to help lay out some architecture requirements for TS/Angular2/(and webpack) applications. So a Java developer pointed out to me this tool and I was scanning for webpack
related issues and stumbled here. Haha not to downplay my perceived omnipresence, but I just haven't setup a way to notify me when there are webpack related discussions throughout github. :smirk:
@TheLarkInn thank you for coming forward. yes we would appreciate any help possible here.
To be frank we started with systemJS since ng2 guys were using it and now they have switched to webpack. We are trying to keep our code as much compatible to Angular CLI as possible.
We currently use Gulp for our complex production build and browsersyc pipe line. See here https://github.com/jhipster/generator-jhipster/blob/angular-2/generators/client-2/templates/_gulpfile.js
Hence it would be helpful if you guys can suggest how far webpack can be used to replace/compliment these workflows. And we will be more than happy if you guys choose to PR things yourself as well 😄
We are webpack newbies FYI
@deepu105 so _technically_ everything in the gulp file could be replaced by 1 or 2 webpack process(s). The question would be how much do you want to, or believe in webpack processing all of your assets, and one compilation process's (and what you want as a task runner). When I added webpack to the angular-cli, I had a hard time convincing people about the need of a "public assets folder", etc and so there may be somethings there in the cli that I don't 100% align with, however I do have somewhat an amount of experience with the architecture and how to implement it.
I'm more than willing to help review a PR, etc. I also really believe in the power of enabling our users to understand webpack and its api's so you can make opinionated and educated architecture decisions about your apps, and then allow webpack to be the client-end glue for your static web assets. (Plus I don't know any Java 😅)
If you would like, we could do a hangout and set aside some time for me to teach you guys anything webpack related, covering any questions, etc. Then if you'd like to still follow the angular-cli approach, or create something similar but slightly tailored to JHipster, I can help review, etc.
@TheLarkInn we wouldn't mind replacing everything if its possible and cleaner. We wouldn't mind a hybrid as well. The assets architecture would be tricky as its a Java appa and needs to be deployed with certain structure, like assets and minified files in the target/www folder.
Yes we can do a hangout but b4 that we need to make ourself familiar with webpack. May be first ill draft out some more detailed questions to understand this more
I'd be interested in joining a hangouts to learn more about webpack. Or
maybe you have a video online that can help us learn more?
On Wed, Oct 26, 2016 at 20:09 Deepu K Sasidharan [email protected]
wrote:
@TheLarkInn https://github.com/TheLarkInn we wouldn't mind replacing
everything if its possible and cleaner. We wouldn't mind a hybrid as well.
The assets architecture would be tricky as its a Java appa and needs to be
deployed with certain structure, like assets and minified files in the
target/www folder.
Yes we can do a hangout but b4 that we need to make ourself familiar with
webpack. May be first ill draft out some more detailed questions to
understand this more—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-256527942,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABF5OCIhUsaqLkjjODjodgvtITZNFhTks5q4AfggaJpZM4Ipod9
.
Awesome that sounds like a perfect first step!! Let's start with that.
@TheLarkInn Thanks again for helping us out.
I'd also join the hangout.
So we have a bit better documentation that we are working on as we speak: webpack.js.org
That is a great place to start and also I have a moderately well received "Core Concepts" video that's a little long winded lol: https://m.youtube.com/watch?v=AZPYL30ozCY
Otherwise get a list of questions and then we can tackle things. I know JHipster has different kinds of app setups: microservices, or server routes MVC. There are separate webpack setups for both varieties and would be happy to talk about both.
I agree with @deepu105 -> if we can replace the whole Gulp config by Webpack, and have something 100% clean coming directly from you @TheLarkInn , it would be a great solution (and you don't need to know Java for that!).
My only concern is concerns the "Developer Experience":
-> So I guess we would need to support BrowserSync with Webpack, so that everyone is happy in the end
@TheLarkInn Thanks for helping us. I managed to do a first webpack integration in this branch on my fork but I'm having some errors like 'cannot resolve type Promise'.
+1 to drop Gulp if possible, there will be alot of work to move gulp tasks into npm tasks with various configurations (sass or not for instance) but I think in the end it will be better : less dependencies in package.json, less tools to install :)
@christopherthielen we have migrated all the routes to ng2 format and I guess we are ready to drop ui router ng1 and go full ng2. Would really appreciate your help on this
@wmarques @sendilkumarn we are almost there. Can any of you take up the interceptors please?
@deepu105 let me have a look later this week.
Currently we have Gulp+BrowserSync which makes a killer combination with hot reload and multiple browsers synchronization
This is possible there is a BrowserSync webpack plugin which works with webpack-dev-server I believe, or potentially replaces it.
Is there specific timelines for this work (besides ASAP) that you are looking to land these changes etc. I ask because I will be away next week in SF for QCon2016, so this week is pretty busy for me.
@wmarques @deepu105 I investigated on the performance issues, I don't think they are due to the hybrid app. It takes 3.6s to SystemJS for loading all the modules (almost 500, 90% from rxjs).
@flaviencathala and would migrating to Webpack solve that performance issue?
Hmmmm what else were we expecting from npm on client. Thats really bad hope
there is a fix for this
Thanks & regards,
Deepu
On 31 Oct 2016 21:13, "Flavien Cathala" [email protected] wrote:
@wmarques https://github.com/wmarques @deepu105
https://github.com/deepu105 I investigated on the performance issues, I
don't think they are due to the hybrid app. It takes 3.6s to SystemJS for
loading all the external modules (almost 500), 90% from rxjs.
[image: screenshot from 2016-10-31 16-20-34]
https://cloud.githubusercontent.com/assets/11872070/19860083/bab0f896-9f87-11e6-9c48-04c5daa622a3.png—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-257329694,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF_jGP-4BPy6qeMKVzoVjKaEOdHmRks5q5gyEgaJpZM4Ipod9
.
Yes Webpack will compile all dependencies into one or few js depending of
configuration which can be minified and loaded.
Web pack will also include only referenced files.
Filip Matuszewski
604 59 99 36
mapa.budzet-partycypacyjny.pl
2016-10-31 16:50 GMT+01:00 Julien Dubois [email protected]:
@flaviencathala https://github.com/flaviencathala and would migrating
to Webpack solve that performance issue?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-257331734,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEy3Hjcs5Hl3Wl2Cz_O3prYWIOBfau0_ks5q5g5BgaJpZM4Ipod9
.
can we tweak systemjs to use only Rxjs/Observable and its dependencies.
may be in our copy function ?
Lets see if migration to webpack fixes this.
Thanks & regards,
Deepu
On 31 Oct 2016 21:58, "Sendil Kumar N" [email protected] wrote:
can we tweak systemjs to use only Rxjs/Observable and its dependencies.
may be in our copy function ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-257343280,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1DiYd2U12bV-ykXkNiv9av6kiARks5q5hcpgaJpZM4Ipod9
.
@deepu105 https://github.com/jhipster/generator-jhipster/pull/4416 there are some additional ng1 uirouter things to clean up, but i got you started. I am super slow right now because I just had surgery on my dominant arm, so I am one-handed
can we tweak systemjs to use only Rxjs/Observable and its dependencies.
The RxJS umd bundle is problematic with ng2: https://github.com/angular/angular/issues/9359
I think its best to fix by bundling with webpack
@christopherthielen thanks a lot
@deepu105 I have some time to help with this today. Where should I dive in?
Could you try to make protractor and karma tests work please. I have a
ticket opened for that
On 04-Nov-2016 10:21 pm, "Matt Raible" [email protected] wrote:
@deepu105 https://github.com/deepu105 I have some time to help with
this today. Where should I dive in?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3664#issuecomment-258485878,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1MrdjO0s7_eYk8WE358IYFtpySZks5q62J2gaJpZM4Ipod9
.
Yes +1 for Karma and Protractor
I'll work on this tomorrow (Monday).
Hi, do you have estimation for when is Angular 2 going to be formally released for this project ?
@davidweianibone depends on community contributions, so no, maybe a month or few weeks.
Thanks wmarques! I'v just started to code with this amazing project and Angular. Hope to gain some more knowledge and also contribute.
@davidweianibone thanks, if you see some improvements don't hesitate to contribute ! :smile:
@christopherthielen I'm getting confused with the router being used in client-2
. At the moment it still uses ui-router-ng2
:
"ui-router-ng2": "1.0.0-beta.3",
"ui-router-visualizer": "2.0.11",
Is the plan to use the Angular router ? I've changed the router on a demo project to the one generated by Angular CLI :
"@angular/router": "^3.1.0",
I then managed to do bits and pieces.
So, ui-router-ng2
or @angular/router
?
@angular/router +1
Hello all I just find out that there is nice setup project for angular 2 and angular 1 made by ngparty
https://github.com/ngParty/Angular2-scaffold I use it in my setup it can be helpful.
Please @allahbaksh, @president-zhou, @huang6349 and others stop adding +1 messages for angular/router, it's just noise without any arguments on a ng2 topic that is already too long, just click on +1 icon on @feel7iii'smessage which was the first one after @agoncal's one.
I deleted redundant messages.
@allahbaksh, @president-zhou, @huang6349 @feel7iii @agoncal we decided to use ui-router as we had it by default in ng1 and it was easier to migrate to and the angular/router didnt have any more features than ui-router so we didnt see a reason to change. Also please note that we have official contribution from @christopherthielen who is the maintainer of ui-router which is much better than we fiddling around with the monster called NG2
i know it's a huge task for @jhipster/developers upgrading from 1.x to 2.x and thx a lot for @jhipster/developers @deepu105 @christopherthielen your greate work.
first of all,i do not agree with you @deepu105 said that @angular/router is a monster, i'm getting confused with that;
since its inception JHipster always choose the most popular technology stack, first from official because it's stable, reliable and compatible(think about Angular CLI in the future) but not easier one or who contribute more(to be honest i personally not like third-party libraries or hybrid app it's not pure).
now @angular/router(The second version) is better enough, the code is clean and clear, it's really very important step to make a choise, it's a matter of deciding what the generators are.
last, how about a vote @jhipster/developers @jhipster/contributor
Let me step in.
We have a very specific issue here with Angular 2: everybody wants it, but we have very, very few contribution.
So for me, if we have @christopherthielen who helps us, and if UI Router works, let's go that way. We just don't have enough resources, and we also can't wait anymore for Angular 2 support, so we just need to move on.
@feel7iii its easy for people to talk about Angular2 and its a different thing to try to actually migrate a real Angular1 app like ours to Angular2 (Mind that we are not NG2 experts) we have spend months of effort trying to migrate and we are still not done and when I meant Angular2(not angular router) is a monster I meant it (No real world samples, no i don't consider the TODO samples out their a real world example. There is literally no documentation on most of real world issues you would face) so unless you have invested a fair amount of time to actually learn NG2 in depth and how it works its impossible to do it without help. And we have real jobs and families too so cant invest all my time on learning NG2.
So we started out migration and were struggling and thats when @christopherthielen came out to help and I was just more than happy to have something done rather than nothing (Also please note that the Angular router is heavily inspired from ui-router) and it wouldnt be fair to ask @christopherthielen to help us to implement Angular router
So if you have a problem with the current implementation you can always come out to help us and improve it we will be happy to see a angular router implementation for our current setup. Otherwise we just don't have the time. To be quite honest I'm liking NG2 less and less each day. And given that we are uncertain about the future of it I would rather have a lib which is cross technology (ui router works for React as well)
Any way this is all my opinion.
I fully agree with what our 2 co-leads say.
@feel7iii wrote: since its inception JHipster always choose the most popular technology stack, first from official because it's stable, reliable and compatible(think about Angular CLI in the future) but not easier one or who contribute more
There is an unwritten policy that you'll find in JHipster and many open source projects: meritocracy and it means that we value contributions more than pure suggestions.
You prefer default router then consider writing a module or an alternative implementation that could become an option.
Agree with that, we had a huge amount of requests about Angular 2 but a very few help on it and the docs, as @deepu105 said, never talk about real use cases.., So we went to the simpliest way to release a proper Angular2 app with best practices included.
Guys, how can I help you ? any small tasks for a guy who just started using Jhipster?
@ramzimaalej maybe you could help @deepu105 on #4110 ?
@jdubois cool, I'll sync up with him.
Guys, I'm interested to help as well. I started using Jhipster few months ago. Do you have any beginner task for me? @ramzimaalej interested to team-up :) ?
@ramzimaalej @nanospeck I'm pretty confident that we will have Webpack working fine today (then we have a discussion to merge it!!!), but then I think the logical step is #4110 -> I checked and indeed we have issues on several screens - @deepu105 does that sound logical to you?
There's also work on Karma and Protractor starting soon, you can begin by looking at them.
Yes guys, protractor shouldnt be too much work, you ca either start from there or have a look at #4407 which has known issues listed you could pick one and comment on that thread that you are doing it. or as @jdubois said you can start with BS4 as well
@wmarques @deepu105 @jdubois @christopherthielen Something to keep in mind about the router : if someone generates a project with JHipster.... and then, uses NG CLI to add bits and pieces here and there, then, this developer will have to deal with two different routers in his/her code.
I agree with all of you: time is crucial here, and if we have expertise with UI Router, and it works, fine, let's keep it like that for now. But I'm just concerned with the incompatibility between code generated between JHipster and NG CLI.
I was wondering if we could have subgens that do the same thing that angular-cli similar to what generator-angular-fullstack does. In that case we could generate proper code for the routes. What do you think ?
@agoncal I agree with you on that, I didn't have a closer look about those two routers, but it seems that the official angular/router will be the defacto router for ng2 so maybe we will move on this once we stabilized our app
Indeed, I see a lot of people using NG CLI as it's probably the only way to have a working Angular 2 project.
There is also great IDE support for NG CLI.
So we need to be "compatible" with it, and that's really very important - so for me that's the first time I see a very good argument to migrate to angular/router.
But at the moment I'd like first to release a working version, and we are quite close to it, so I don't want to refactor everything right now.
First, we release, then, we see how we can improve stuff.
@jdubois I've created an issue to keep track of the code difference between JHipster and NG CLI : https://github.com/jhipster/generator-jhipster/issues/4534
@nanospeck yeap, we can team up :) I will have limited access during the rest of the week as I'm traveling though.
does the jhipster ng2 surpport richtext input(picture+text)?
@fuwanguo I don't know what richtext has to do with ng2, it's just another feature, so no.
This ticket is locked to collaborators only for any further discussion on the matter go to https://github.com/jhipster/generator-jhipster/issues/4549
@deepu105 can we close this in favor of #4549 ? It just grow too big...
Most helpful comment
I think we should also consider generating a project that is compatible with angular-cli as this is the new official way to scaffold a project and run some other commands like generating new routes, linting, running tests, ...
In some way, angular-cli overlaps with yeoman.