Comments (6)
The point is being able to do
angular.module('myApp', [
require('angular-placeholder')
]);
from angular-placeholder.
Is this a pattern that Angular libraries typically follow? Is there Webpack documentation on this approach?
I ask because I don't use Webpack and this works great with Browserify as-is. Also, if I change the main entry to index.js
with the content you suggested, none of the code would be exported.
Wouldn't the exact same effect be accomplished if I had module.exports = "taiPlaceholder";
as the last line in lib/tai-placeholder.js
?
from angular-placeholder.
it seems that all angular official modules follow this pattern.
The code actually does not need to be exported, out just needs to be executed to register the module inside angular.
You can indeed make the change in the current main file but don't forget to check that module.exports actually exists (for bower and "old-school" users)
from angular-placeholder.
On the other hand I don't know Browserify will react the the change. But if you already use things like angular-animate or angular-cookies it shouldn't be a problem.
from angular-placeholder.
This appears to have no problems whatsoever for me and it helps you out. I've added a test to confirm the functionality and everything appears to be working as expected. I've released 1.1.0 in the hopes that it works for you. Let me know if I didn't do it right.
from angular-placeholder.
Thank you, works perfectly.
from angular-placeholder.
Related Issues (12)
- Please, cut a new release with latest bower support HOT 3
- Moving the shim detection to outside of the bindings HOT 5
- Placeholder is empty for input type="password"
- multiline placeholder HOT 4
- Build broken - Sauce labs doesn't like me
- NPM publish HOT 2
- Placeholder class is not removed on input[type=
- Placeholder class is not removed on input[type='email'] HOT 9
- Placeholder does not play well with required in 1.3 and ng-required in 1.2 HOT 7
- . HOT 1
- IE9 delete & tab out changes input value HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-placeholder.