angular-dart

Angular dart on WebStorm. Debug is no more working

牧云@^-^@ 提交于 2019-12-11 15:32:10
问题 It is a week now that I have problems debugging angular dart applications in WebStorm. If I use debug on a console (server) application everything works fine. I tried to roll back to angular 4.0.0 (on dart 1.24.3), but this didn't help. I really don't know what kind of info could be useful. Please, let me know if there is some configuration file that I can print or that could be important in order to fix the problem. I tested a lot of configurations, but, at present, I'm not able to work

Angular Dart - Using sass files

旧城冷巷雨未停 提交于 2019-12-11 15:16:49
问题 I am trying to set up sass with Angular Dart but I'm a bit lost and couldn't find a documentation past 2016 (a good one) I currently have the following structure: However I cannot reference a main.css file as it is not found and if in a component I put something like this styleUrls: ['lib/assets/sass/main.scss'] The webdev serve command fails My pubscpec is dependencies: angular: ^5.0.0 angular_components: ^0.9.0 bootstrap_sass: any dev_dependencies: angular_test: ^2.0.0 sass_builder: ^2.1.1

Do publishAs values have to be unique in Angular Dart?

血红的双手。 提交于 2019-12-11 13:02:01
问题 I suspect this is a bug, possibly even a manifestation of https://github.com/angular/angular.dart/issues/396. I want to register multiple controllers and want to use ctrl as the value of the publishAt field within @NgDirective . This leads to the second ctrl clobbering the value of the first one, even though they exist in different scopes. Here is the view: <!DOCTYPE html> <html> <body> <div> <div foo-controller> <!-- PRINTS 'bar'. --> <p>{{ctrl.item}}</p> </div> <div bar-controller> <!--

Replacing an item in List causes NotFoundError in AngularDart

ぐ巨炮叔叔 提交于 2019-12-11 11:32:59
问题 "replace" is called if I click on <a class="replace" href="#" ng-click="replace(musician.lastname)">[ REPL ]</a> void replace(final String lastname) { _zone.run(() { final Address addressFromList = _model.musicians.firstWhere((final Address address) => lastname == address.lastname); final int index = _model.musicians.indexOf(addressFromList); _logger.info("Replace $lastname (Index: $index)"); _model.musicians[index] = new Address("Tina","Turner"); }); } if index is 0 (first one) it works but

Routing: get notified about parameter updates without reloading the view

偶尔善良 提交于 2019-12-11 10:51:42
问题 This is my first attempt with routing in Angular but it works so far (suggestions for improvement are welcome) call(Router router, ViewFactory views) { router.root ..addRoute( name: 'form', path: '/:entityId/form/:recId', enter: views('view/dynamic_form.html') ) ..addRoute( name: 'table', path: '/:entityId/table/:recId', enter: views('view/dynamic_table.html') ) ..addRoute( name: 'default_view', defaultRoute: true, enter: (_) => router.go('form', { 'entityId': '', 'rec': '-1' }, replace: true

If two different components are in the same view (ngRoute), how can they share a common object or communicate?

删除回忆录丶 提交于 2019-12-11 09:41:20
问题 In AngularDart I have a view. https://angulardart.org/tutorial/08-ch06-view.html 'demo_table': ngRoute( path: '/demo/table', view: 'views/demotable.html' ), On the view I have two components. <component1 view-string="Component 1"></component1> <component2 view-string="Component 2"></component1> I would like view-string to be an instance of a string which may be changed by either component1 or component2. The changes should be reflected in the display of the string in the component. I don't

Angular Dart: Data binding doesn't work when manipulating the controller from the outside, part two

假装没事ソ 提交于 2019-12-11 08:09:08
问题 A short background: This example is a slightly more complicated version of my Angular Dart: Data binding doesn't work when manipulating the controller from the outside question that has been answered correctly. I only added a toggleable "show resolved comments" link to this version. Even though I initialized every variable to non-null values the problem still happens. Full description of the actual problem: I have two controllers nested into each other. The outer controller shows/hides the

$event in AngularDart 1.0 is not available anymore - what is the alternative?

≡放荡痞女 提交于 2019-12-11 07:42:42
问题 Pre AngularDart 1.0 I used something like <button on-click="handleClearClicked($event)">Clear</button> $event is not available anymore. I get ...has no instance getter '$event'. NoSuchMethodError: method not found: '$event' What is the alternative? 回答1: Ha - found the answer. Pre Angular 1.0 it worked with on-click now it has to be ng-click So I changed the sample from above to: <button ng-click="handleClearClicked($event)">Clear</button> and voila - $event ist back again. (not sure if this

OnScroll Event is not working - Angular Dart

只愿长相守 提交于 2019-12-11 06:46:21
问题 I have an issue with the window.onScroll event. The event was never triggered. That's my first try: @override void ngOnInit() { window.onScroll.listen((Event event) => print("it works..")); } But it's not working. I basiclly need the onScroll event. Not more. So i tried the "old school" way in Html My second try: <div (scroll)="onScroll()"> <!--Some content--> </div> But it's also not working. What is the best solution to get the scroll event in AngularDart? By the way, i use AngularDart 5.

How to reference child component from its parent in AngularDart in AD 1.0.0

房东的猫 提交于 2019-12-11 03:07:32
问题 I have been using the answer from this AngularDart: How to include subcomponents in a custom component template Using something similar to this: <tabs> <tab>some tab content</tab> <tab>another tab</tab> </tabs> My constructor for Tab is like Tab(Tabs tabs) { tabs.add(this); } This would let me create a "Tabs" component and add the child "Tab" to the a list of tabs in the the Tabs controller. Up until AngularDart 0.14.0, but with 1.0 the component passed to the constructor of the child is now