angular-dart

Use SCSS style files within AngularDart 5 and Dart 2

自闭症网瘾萝莉.ら 提交于 2019-11-28 00:34:21
问题 I’m working with Dart 2 and AngularDart 5 . ⚠ I searched online about my question, but I didn’t find a satisfactory answer. ❔ Can somebody explain all the steps I need to include and to work with SCSS style files within my AngularDart application? I started with quickstart application that you can find here. Thank you! 回答1: Add a dev dependency to your pubspec.yaml for sass_builder: ^2.0.0 . Run pub get to download the new dependencies. Create a sass file ex: lib/app_component.scss and add

loading google map in angular.dart view (ng-view)

本秂侑毒 提交于 2019-11-27 08:19:34
问题 I am trying to create a single page app in angular.dart with multiple views , but I cant find a working example of loading up a Google Map in a view being routed into. I am using the google_maps package. It works out fine when the div element to contain the map is defined in the main index.html page, but an exception is thrown when the map div is defined in the view: 'TypeError: Cannot read property 'offsetWidth' of null' I suppose this means the view has not been rendered by the time the

Angular2 dynamic change CSS property

醉酒当歌 提交于 2019-11-27 06:56:47
We are making an Angular2 application and we want to be able to somehow create a global CSS variable (and update the properties' values whenever changed when the variable is assigned). We had used Polymer for a while (now we are switching to Angular2 components) and we had used CSS properties (Polymer has some polyfill) and we had just update styles using Polymer.updateStyles() . Is there any way how we can achieve a similar function? EDIT: We want something similar to Sass color: $g-main-color or to CSS custom properties color: var(--g-main-color) and whenever we decide to change the value of

Why is Controller deprecated in AngularDart 0.10.0?

我是研究僧i 提交于 2019-11-27 06:00:29
问题 I just upgraded to AngularDart 0.10, renamed my Ngcontrollers to Controller and I am very surprised to see that Controller is marked as deprecated by dart-editor. I have seen that Controller is supposed to disappear in AngularDart 1.0 [1] but why is it already deprecated? Am I supposed to use something else right now? [1] http://blog.angulardart.org/2014/04/angulardart-0100-ostemad-teleportation.html 回答1: I haven't really understood this change myself but some information: https://github.com

Breakpoints in Dartium not working

孤者浪人 提交于 2019-11-27 05:30:37
So if I add break points in .dart files that are located in /web directory of my project, it works fine. For example I'm using AngularDart and the main.dart file works. However when I try to put a breakpoint in anything in the /lib directory, Dartium doesn't stop on them. How can I get the breakpoints in Dartium to work with the /lib directory? Note that I've tried putting breakpoints with Dart Editor, IntelliJ with Dart Plugin and also directly in Dartium and nothing works. Is this intended? Günter Zöchbauer To set breakpoints in dependencies search the source inside the (no domain) node and

How to bind to data-* attribute in angular2? [duplicate]

若如初见. 提交于 2019-11-27 00:55:22
This question already has an answer here: Angular 2 data attributes 2 answers Assuming I have really large grid of cells I want to add data-row and data-col atribute values and bind from model. How can I bind data-row from angular2 (beta0 in Dart). Binding with data-row="{{boundVal}}" does not seem to work. (no data attribute appears in output html) eg. <table> <tr *ngFor="#row of rows" > <td *ngFor="#cell of row.cells" data-row="{{row.index}}" data-col="{{cell.index}}" > </td> </tr> </table> This should do what you want [attr.data-row]="row.index" [attr.data-col]="cell.index" 来源: https:/

How to communicate between Angular DART controllers

佐手、 提交于 2019-11-26 18:37:12
问题 i have two controllers and want to "send" between them object. I have something like this: @NgController(selector: '[users]', publishAs: 'ctrl') class UsersController { List<Users> users; } @NgController(selector: '[user_logs]', publishAs: 'ctrl') class LogsController { List<Log> logs; void filterLogsFor(User user) { logs = ... } } class MyAppModule extends Module { MyAppModule() { type(LogsController); type(UserController); } } My solution was simply adding LogsController to UserController

How to add a component programmatically in Angular.Dart?

≯℡__Kan透↙ 提交于 2019-11-26 15:24:16
I would like to dynamically build a component tree basing on some information received from AJAX calls. How to programmatically add a component to the DOM from inside of other component? I have <outer-comp> and I would like, basing on some logic, insert an <inner-comp> . The following code just inserts the elements <inner-comp></inner-comp> to the DOM, and not actual <inner-comp> representation. @NgComponent( selector: 'outer-comp', templateUrl: 'view/outer_component.html', cssUrl: 'view/outer_component.css', publishAs: 'outer' ) class AppComponent extends NgShadowRootAware { void onShadowRoot

Breakpoints in Dartium not working

牧云@^-^@ 提交于 2019-11-26 12:48:32
问题 So if I add break points in .dart files that are located in /web directory of my project, it works fine. For example I\'m using AngularDart and the main.dart file works. However when I try to put a breakpoint in anything in the /lib directory, Dartium doesn\'t stop on them. How can I get the breakpoints in Dartium to work with the /lib directory? Note that I\'ve tried putting breakpoints with Dart Editor, IntelliJ with Dart Plugin and also directly in Dartium and nothing works. Is this

How to bind to data-* attribute in angular2? [duplicate]

不羁岁月 提交于 2019-11-26 07:30:04
问题 This question already has answers here : How can I write data attributes using Angular? (2 answers) Closed 3 years ago . Assuming I have really large grid of cells I want to add data-row and data-col atribute values and bind from model. How can I bind data-row from angular2 (beta0 in Dart). Binding with data-row=\"{{boundVal}}\" does not seem to work. (no data attribute appears in output html) eg. <table> <tr *ngFor=\"#row of rows\" > <td *ngFor=\"#cell of row.cells\" data-row=\"{{row.index}}