ngxs / ngxs-examples Goto Github PK
View Code? Open in Web Editor NEWNGXS Example Apps
NGXS Example Apps
Hi, I'm looking to use NGXS for the first time and wanted to make sure I started off my naming convention on the right foot.
In some examples, the class that houses the @selectors and @actions are suffixed with "Store" and the state models are suffixed with "State".
In other examples, those types of classes are suffixed with "State" and the state models are suffixed with "Model".
I looked at the style guide and didn't see anything specific other than the naming of the files themselves. Can someone point me in the right direction on this?
Are project 2, 3 and 4 not pushed? readme gives the impression that they are complete but I couldn't find them in the repo.
This lib is really great, but I'm trying to make an effort to unit test all of my code and I was hoping to find examples of unit tests. Specifically the DI piece and mocking the NGXS pieces.
When my component constructor takes in the store as a constructor and I import NgxsModule.forRoot([MyState])
in the TestBed my tests still fail w/ "Can't resolve all parameters for ".
This would be a great repo to show how to unit test an app that uses NGXS including mocking.
At that point the URL already shows /dashboard route and it also with enabled tracing, you can see the navigation has ended successfully.
However the still appears in the DOM.
onLoginSuccess, navigating to /dashboard
platform-browser.js:380 Router Event: NavigationStart
platform-browser.js:367 NavigationStart(id: 1, url: '/dashboard')
platform-browser.js:367 NavigationStart {id: 1, url: "/dashboard"}
auth.state.ts:129 setUserStateOnSuccess
platform-browser.js:380 Router Event: RouteConfigLoadStart
platform-browser.js:367 RouteConfigLoadStart(path: dashboard)
platform-browser.js:367 RouteConfigLoadStart {route: {…}}
platform-browser.js:380 Router Event: RouteConfigLoadEnd
platform-browser.js:367 RouteConfigLoadEnd(path: dashboard)
platform-browser.js:367 RouteConfigLoadEnd {route: {…}}
platform-browser.js:380 Router Event: RoutesRecognized
platform-browser.js:367 RoutesRecognized(id: 1, url: '/dashboard', urlAfterRedirects: '/dashboard', state: Route(url:'', path:'') { Route(url:'dashboard', path:'dashboard') { Route(url:'', path:'') } } )
platform-browser.js:367 RoutesRecognized {id: 1, url: "/dashboard", urlAfterRedirects: "/dashboard", state: RouterStateSnapshot}
platform-browser.js:380 Router Event: GuardsCheckStart
platform-browser.js:367 GuardsCheckStart(id: 1, url: '/dashboard', urlAfterRedirects: '/dashboard', state: Route(url:'', path:'') { Route(url:'dashboard', path:'dashboard') { Route(url:'', path:'') } } )
platform-browser.js:367 GuardsCheckStart {id: 1, url: "/dashboard", urlAfterRedirects: UrlTree, state: RouterStateSnapshot}
platform-browser.js:380 Router Event: ChildActivationStart
platform-browser.js:367 ChildActivationStart(path: '')
platform-browser.js:367 ChildActivationStart {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: ActivationStart
platform-browser.js:367 ActivationStart(path: 'dashboard')
platform-browser.js:367 ActivationStart {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: ChildActivationStart
platform-browser.js:367 ChildActivationStart(path: 'dashboard')
platform-browser.js:367 ChildActivationStart {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: ActivationStart
platform-browser.js:367 ActivationStart(path: '')
platform-browser.js:367 ActivationStart {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: GuardsCheckEnd
platform-browser.js:367 GuardsCheckEnd(id: 1, url: '/dashboard', urlAfterRedirects: '/dashboard', state: Route(url:'', path:'') { Route(url:'dashboard', path:'dashboard') { Route(url:'', path:'') } } , shouldActivate: true)
platform-browser.js:367 GuardsCheckEnd {id: 1, url: "/dashboard", urlAfterRedirects: UrlTree, state: RouterStateSnapshot, shouldActivate: true}
platform-browser.js:380 Router Event: ResolveStart
platform-browser.js:367 ResolveStart(id: 1, url: '/dashboard', urlAfterRedirects: '/dashboard', state: Route(url:'', path:'') { Route(url:'dashboard', path:'dashboard') { Route(url:'', path:'') } } )
platform-browser.js:367 ResolveStart {id: 1, url: "/dashboard", urlAfterRedirects: UrlTree, state: RouterStateSnapshot}
platform-browser.js:380 Router Event: ResolveEnd
platform-browser.js:367 ResolveEnd(id: 1, url: '/dashboard', urlAfterRedirects: '/dashboard', state: Route(url:'', path:'') { Route(url:'dashboard', path:'dashboard') { Route(url:'', path:'') } } )
platform-browser.js:367 ResolveEnd {id: 1, url: "/dashboard", urlAfterRedirects: UrlTree, state: RouterStateSnapshot}
platform-browser.js:380 Router Event: ActivationEnd
platform-browser.js:367 ActivationEnd(path: '')
platform-browser.js:367 ActivationEnd {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: ChildActivationEnd
platform-browser.js:367 ChildActivationEnd(path: 'dashboard')
platform-browser.js:367 ChildActivationEnd {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: ActivationEnd
platform-browser.js:367 ActivationEnd(path: 'dashboard')
platform-browser.js:367 ActivationEnd {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: ChildActivationEnd
platform-browser.js:367 ChildActivationEnd(path: '')
platform-browser.js:367 ChildActivationEnd {snapshot: ActivatedRouteSnapshot}
platform-browser.js:380 Router Event: NavigationEnd
platform-browser.js:367 NavigationEnd(id: 1, url: '/dashboard', urlAfterRedirects: '/dashboard')
platform-browser.js:367 NavigationEnd {id: 1, url: "/dashboard", urlAfterRedirects: "/dashboard"}
Hi
This is not an issue just a request for assistance
I was wondering if you can point me at any samples that show you how to perform an auto logout after 5 minutes of inactivity?
Thanks
Damien
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.