lejard-h / angular_recaptcha Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
I built a simple web program to test it out in angular 4. Recaptcha worked fine from Dartium. However when I built with dartdevc, I got errors. Which directory does it generate lib__angular_recaptcha.template.js and angular_recaptcha.template.dart ?
Loading angular, test/pub_serve and dart_to_js_script_rewriter transformers...
Building test2...
Building dartdevc modules...
Error compiling dartdevc module:test2|lib/lib__angular_recaptcha.template.js
[error] The return type 'void' isn't a 'bool', as defined by the method 'handle_input_'. (package:test2/angular_recaptcha.template.dart, line 56, col 12)
Please fix all errors before compiling (warnings are okay).
Build failed.
Hi,
I tried the example within readme and it threw an exception:
EXCEPTION: No value accessor for ''
This works most of the time but many times captcha does not render because _grecaptcha is null while the page is rendering
@OverRide
void ngAfterViewInit() {
if (_autoRender != false && _grecaptcha != null) {
render();
} else if ( _grecaptcha == null){
window.alert(' _grecaptcha is null');
}
}
if we use auto-render why should the render be explicit ?
Hello.
I'm trying to run an example that is at https://github.com/lejard-h/angular_recaptcha
When I do the build an error occurs.
[Error from Dart2JS on recaptcha|web/main.dart]: web\packages\angular_recaptcha\angular_recaptcha.dart:33:32: Class 'AngularRecaptcha' can't extend the type 'DefaultValueAccessor' because it is malformed. Try correcting the malformed type annotation or removing the 'extends' clause. class AngularRecaptcha extends DefaultValueAccessor implements AfterViewInit { ^^^^^^^^^^^^^^^^^^^^ [Error from Dart2JS on recaptcha|web/main.dart]: web\packages\angular_recaptcha\angular_recaptcha.dart:55:47: 'super' call arguments and constructor parameters do not match. AngularRecaptcha(this._ref, this.ngModel) : super(_ref) { ^^^^^^^^^^^ [Dart2JS on recaptcha|web/main.dart]:
The HTML in the template of "More" doesn't work for me or match what's in "Use It" (which does work)
Version 0.1.4 has dependency on angular_form 2 which prevents from working with Angular 6.
I have manually rebuild it with the latest libraries and it works perfectly.
dependencies:
angular: ^6.0.1
angular_forms: ^3.0.0
js: ^0.6.2
dart_browser_loader: ^0.0.6+1
Created a sample angular2 app with recaptcha
dependency as given below and is throwing the following error on pub get
.
environment:
sdk: '>=1.19.0 <2.0.0'
dependencies:
angular2: '>=2.2.0 <2.3.0'
angular2_components: '>=0.2.2 <0.3.0'
angular_recaptcha:
dev_dependencies:
browser: ^0.10.0
dart_to_js_script_rewriter: ^1.0.1
transformers:
- angular2:
platform_directives:
- 'package:angular2/common.dart#COMMON_DIRECTIVES'
platform_pipes:
- 'package:angular2/common.dart#COMMON_PIPES'
entry_points: web/main.dart
- dart_to_js_script_rewriter
Error,
Error on line 24, column 3 of ../../../.pub-cache/hosted/pub.dartlang.org/angular_recaptcha-0.0.1/pubspec.yaml:
Error loading transformer "dart_to_js_script_rewriter": package "dart_to_js_script_rewriter" is not a dependency.
- dart_to_js_script_rewriter
^^^^^^^^^^^^^^^^^^^^^^^^^^
Pub Build
Loading angular2 transformers...
No matching file found for the following Angular2 transformer entry_points:
- example/main.dart
pub get
freezes when I run following command :
Many users can't develop their angular dart app without this component
name: asdasd
description: asdasd
version: 0.0.1
environment:
sdk: '>=2.0.0-dev.28.0 <2.0.0'
dependencies:
angular: ^5.0.0-alpha+4
angular_forms: ^1.0.1-alpha+2
angular_router: ^2.0.0-alpha+2
http: ^0.11.0
stream_transform: ^0.0.6
angular_recaptcha: ^0.0.1
dev_dependencies:
angular_test: ^2.0.0-alpha
build_runner: ^0.7.10+1
build_test: ^0.10.0
build_web_compilers: ^0.3.0
test: ^0.12.30
Tried to use it as per the example -
<angular-recaptcha #recaptcha key=" the key value --- " [(ngModel)]="value">
This gives error -
Observatory listening at http://127.0.0.1:49653/
EXCEPTION: Error: Missing required parameters: sitekey
EXCEPTION: Error: Missing required parameters: sitekey
STACKTRACE:
dart:js JsNative.callMethod
package:angular_recaptcha/angular_recaptcha.dart_js_interop_patch.dart 39:30 _render
package:angular_recaptcha/angular_recaptcha.dart 75:11 AngularRecaptcha.render
if i use -
<angular-recaptcha [(ngModel)]="value" key=" --- " auto-render>
i get -
Observatory listening at http://127.0.0.1:50686/
EXCEPTION: NoSuchMethodError: The method 'render' was called on null.
Receiver: null
Tried calling: render()
EXCEPTION: NoSuchMethodError: The method 'render' was called on null.
Receiver: null
Tried calling: render()
STACKTRACE:
dart:core Object.noSuchMethod
package:test/loginpart/hero_login_component.dart 47:9 HeroLoginComponent.ngOnInit
It would be nice that if when the recaptcha verification expires, whatever is linked in ngModel was set back to null
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.