This will walk you through a simple setup of the @daffodil
packages.
Please note that as of now, we don't provide any pre-built store application pages. We do provide the
@daffodil/design
component kit, and many examples in@daffodil/demo
, but, out-of-the-box, you won't see much different than a default Angular installation.
ng new my-store && cd my-store
- Install Daffodil Modules You Need
npm install --save @daffodil/product
- Install Product Modulenpm install --save @daffodil/cart
- Install Cart Modulenpm install --save @daffodil/checkout
- Install Checkout Modulenpm install --save @daffodil/newsletter
- Install Newsletter Module
npm install --save @daffodil/core @daffodil/driver @ngrx/store @ngrx/effects @ngrx/entity
Add the following to your new application's root AppModule
.
Be sure to replace the default
YOUR_STORE_URL_GOES_HERE
with your store's url in yourAppModule
.
@NgModule({
...
imports: [
...
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
DaffodilModule.forRoot({BASE_URL: "YOUR_STORE_URL_GOES_HERE"}),
...
],
...
})
export class AppModule { }
Serving the app should be very familiar if you've ever worked with Angular. It should be as simple as:
ng serve
- Visit http://localhost:4200 in your browser
Check out Daffodil's demo store for code examples.