- The “bower:css” section will hold the list of Bower CSS files, while “inject:css” will hold the list of CSS files in the application.
- The first .pipe in this file gathers a list of files from bower.json , while the second .pipe builds a list of CSS and JS files within the project.
- Modify index.html to add comments so gulp-inject knows where it should put its list of files.
- The post Add Gulp Inject to Your AngularJS Application appeared first on Stormpath User Identity API.
Add Gulp Inject to Your AngularJS Application
tags for your own code (controllers, directives, services).
Stormpath provides integration support for AngularJS and Angular. These libraries allow you to easily add login, registration, forgot password and other Stormpath features to your Angular applications.
NOTE: When I say “AngularJS”, I mean Angular 1.x. “Angular” is the forward-looking name for Angular 2 and beyond.
In a previous tutorial, I showed you how to configure access control in your AngularJS UI and configure CORS with Stormpath’s Spring Boot starter. To begin, clone the project from that tutorial:
Open a terminal window and navigate to the project you cloned above. Install all the dependencies you’ll need:
, load all of these plugins:
After adding the “inject” task, modify the “dist” and “serve” tasks to depend on it.
directory to a web server. If you have Python installed, you can run the following command to startup a web server in the current directory.
You can integrate Stormpath into a JHipster application using the handy Stormpath Module for JHipster. It’s easy to install and use in a JHipster 3.x project:
In a future blog post, I’ll show you how to override the default templates in Stormpath’s AngularJS SDK and translate them for multiple languages using angular-translate.
If you have any questions, please add a comment below or hit me up @mraible on Twitter.