angular-dart

angular.dart NgTwoWay and NgAttr deprecated?

☆樱花仙子☆ 提交于 2019-12-01 15:42:27
I have just started using Angular dart and Im going through the online tutorial with examples, and DartEditor is currently striking out NgAttr and NgTwoWay saying they are deprecated, is this the case? and if so what are they being replaced with? the auto docs don't say. NgAttr , NgOneWay , NgTwoWay , etc. were marked deprecated in preparation to the new bind-* syntax, which is not implemented, yet. So deprecation is arguably a bit premature, since there's no action for users to take, but I guess it is a first warning of the impending major breaking change. As of AngularDart 0.13.0, these

angular.dart NgTwoWay and NgAttr deprecated?

你离开我真会死。 提交于 2019-12-01 15:23:26
问题 I have just started using Angular dart and Im going through the online tutorial with examples, and DartEditor is currently striking out NgAttr and NgTwoWay saying they are deprecated, is this the case? and if so what are they being replaced with? the auto docs don't say. 回答1: NgAttr , NgOneWay , NgTwoWay , etc. were marked deprecated in preparation to the new bind-* syntax, which is not implemented, yet. So deprecation is arguably a bit premature, since there's no action for users to take,

How to serve several different directories in Angular Dart project?

元气小坏坏 提交于 2019-12-01 09:41:26
I'm trying to set up several configurations in my Angular Dart project, to make it possible to serve and build different versions of Angular application from several different top level directories (apart from standard web directory) For a demonstration I've created standard Angular Dart application from template ( https://github.com/vadimtsushko/two_configs_test ), and have copied web directory to web2 . I can successfully run application from web directory with pub run build_runner serve web:8080 . Now I add config file build.web2.yaml with such content: targets: $default: builders: build

AngularDart: Namespace of route names hierarchical too?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 09:35:58
问题 Consider the following initialization of hierarchical routes (excerpt from the AngularDart tutorial): router.root ..addRoute( name: 'add', path: '/add', enter: view('view/addRecipe.html')) ..addRoute( name: 'recipe', path: '/recipe/:recipeId', mount: (Route route) => route ..addRoute( name: 'view', path: '/view', enter: view('view/viewRecipe.html')) ..addRoute( name: 'edit', path: '/edit', enter: view('view/editRecipe.html')) ..addRoute( name: 'view_default', defaultRoute: true, enter: (_) =>

problems with dart-server/angulardart and CORS

落爺英雄遲暮 提交于 2019-12-01 09:29:59
I am using dart on my server and angulardart as my client. I can request data via http.get on my server, that is working fine - but I can't get POST to work. Server: (the server makes use of "Start" https://github.com/lvivski/start ) //runs at 127.0.0.1:4040: server.post("/rest/qr").listen((request) { addCorsHeaders(request.response); request.payload().then((map) { print(map); }).then((_) { request.response.send("ok"); }); }); Client (angular): // runs at http://127.0.0.1:3030 final String _codesUrl = "http://127.0.0.1:4040/rest/qr"; _http.post(_codesUrl, JSON.encode(temp.toMap())).then(

problems with dart-server/angulardart and CORS

泄露秘密 提交于 2019-12-01 08:49:37
问题 I am using dart on my server and angulardart as my client. I can request data via http.get on my server, that is working fine - but I can't get POST to work. Server: (the server makes use of "Start" https://github.com/lvivski/start) //runs at 127.0.0.1:4040: server.post("/rest/qr").listen((request) { addCorsHeaders(request.response); request.payload().then((map) { print(map); }).then((_) { request.response.send("ok"); }); }); Client (angular): // runs at http://127.0.0.1:3030 final String

Analog of ngTransclude in Angular.Dart

痞子三分冷 提交于 2019-12-01 06:04:45
I'm trying to figure out how to make a component render its children. So I can compile: <my-component> <div id="child"></div> </my-component> into something like this: <div id="parent"> <!-- some component stuff --> <div id="child"></div> </div> Is there something like ngTransclude in Angular.Dart? James deBoer AngularDart uses Shadow DOM in place of ngTransclude. This is one of the ways we are pushing Angular into the browser with emerging web standards. Adding a <content> tag instead your component's template will cause the child element to be placed there. e.g. in your example <my-component

Angular 2 Dart: How to detect click on everything but element?

点点圈 提交于 2019-12-01 05:14:54
On an app with a lot of different components within one component I have a custom Auto-suggest box. The box should be closed if the user clicks anywhere but on the Auto-suggest box (or containing elements of the auto-suggest box). This is what I would do in jQuery: $(document).on('click','body',function(e) { if(e.target!='.suggestbox' && $(e.target).parent('.suggestbox').length <1 ) { $('.suggestbox').remove(); } }); However In my Angular Dart templates I have: index.html: <body> <my-app> // sub component // sub sub component </my-app> </body> I can think of a possibility in detecting a click

Analog of ngTransclude in Angular.Dart

此生再无相见时 提交于 2019-12-01 04:00:05
问题 I'm trying to figure out how to make a component render its children. So I can compile: <my-component> <div id="child"></div> </my-component> into something like this: <div id="parent"> <!-- some component stuff --> <div id="child"></div> </div> Is there something like ngTransclude in Angular.Dart? 回答1: AngularDart uses Shadow DOM in place of ngTransclude. This is one of the ways we are pushing Angular into the browser with emerging web standards. Adding a <content> tag instead your component

Angular 2 Dart: How to detect click on everything but element?

不想你离开。 提交于 2019-12-01 03:20:30
问题 On an app with a lot of different components within one component I have a custom Auto-suggest box. The box should be closed if the user clicks anywhere but on the Auto-suggest box (or containing elements of the auto-suggest box). This is what I would do in jQuery: $(document).on('click','body',function(e) { if(e.target!='.suggestbox' && $(e.target).parent('.suggestbox').length <1 ) { $('.suggestbox').remove(); } }); However In my Angular Dart templates I have: index.html: <body> <my-app> //