• Blogs (9)
    • 📱 236 - 992 - 3846

      đź“§ jxjwilliam@gmail.com

    • Version: ‍🚀 1.1.0
  • AngularJS and Browserify

    Blogs20152015-07-21


    1. AngularJS and Browserify

    Can AngularJS and Browserify work together? It seems an option. The following is an interesting article:

    AngularJS And Browserify — The Dream Team For Single Page Applications

    2. The way to extend 3rd-party directives

    • customize the 3rd-party opensource directly, modify for the specific purpose.
    • use $provide.decorator() to overwrite or add new stuff against the origin.
    • from stackoverflow: Probably the simplest way to solve this is to create a directive on your app with the same name as the third party directive. Both directives will run and you can specify their run order using the priority property (higher priority runs first). The two directives will share scope and you can access and modify the scope of the third party directive via your directive’s link method.
    • You can also access a third party directive’s scope by simply putting your own arbitrarily named directive on the same element with it (assuming neither directive uses isolate scope). All non-isolate scope directives on an element will share scope.

    3. ng-form default classes

    The following is default ngForm CSS classes:

    • ng-valid is set if the form is valid.
    • ng-invalid is set if the form is invalid.
    • ng-pristine is set if the form is pristine.
    • ng-dirty is set if the form is dirty.
    • ng-submitted is set if the form was submitted.