Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aot compatible version of angular2-busy #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,25 @@ import {BusyModule, BusyConfig} from 'angular2-busy';
export class AppModule
```

If you face an error on Angular 4 like this:
`ERROR in Error encountered resolving symbol values statically. Calling function 'BusyConfig', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function,`
, you can supply BusyConfig as a provider rather than performing a forRoot() call statically during the import. For example, in your app module:

```typescript
export function busyConfigFactory() {
return new BusyConfig({
template: '<div class="ng-busy-square-spinner"></div>'
});
}
```
And in your `providers` array you can provide `BusyConfig` using the function above:
```typescript
providers: [
...
{ provide: BusyConfig, useFactory: busyConfigFactory }
]
```

## FAQ

### The indicator's position is not inside the `ngBusy` container
Expand Down
6 changes: 3 additions & 3 deletions build/busy-backdrop.component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/busy-backdrop.component.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/busy-backdrop.component.metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"__symbolic":"module","version":3,"metadata":{"BusyBackdropComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-busy-backdrop","template":"\n <div class=\"ng-busy-backdrop\"\n @fadeInOut\n *ngIf=\"isActive()\">\n </div>\n ","animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["fadeInOut",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease"]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]}]}]]}]]}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./promise-tracker.service","name":"PromiseTrackerService"}]}],"isActive":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"BusyBackdropComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-busy-backdrop","template":"\n <div class=\"ng-busy-backdrop\"\n @fadeInOut\n *ngIf=\"isActive()\">\n </div>\n ","animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["fadeInOut",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease"]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]}]}]]}]]}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./promise-tracker.service","name":"PromiseTrackerService"}]}],"isActive":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"BusyBackdropComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-busy-backdrop","template":"\n <div class=\"ng-busy-backdrop\"\n @fadeInOut\n *ngIf=\"isActive()\">\n </div>\n ","animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["fadeInOut",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease"]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]}]}]]}]]}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./promise-tracker.service","name":"PromiseTrackerService"}]}],"isActive":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"BusyBackdropComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"ng-busy-backdrop","template":"\n <div class=\"ng-busy-backdrop\"\n @fadeInOut\n *ngIf=\"isActive()\">\n </div>\n ","animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger"},"arguments":["fadeInOut",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["void => *",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease"]}]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition"},"arguments":["* => void",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate"},"arguments":[".3s ease",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style"},"arguments":[{"opacity":0}]}]}]]}]]}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./promise-tracker.service","name":"PromiseTrackerService"}]}],"isActive":[{"__symbolic":"method"}]}}}}]
16 changes: 8 additions & 8 deletions build/busy-config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
* @author yumao<[email protected]>
*/
import { Subscription } from 'rxjs/Subscription';
export declare const BUSY_CONFIG_DEFAULTS: {
template: string;
delay: number;
minDuration: number;
backdrop: boolean;
message: string;
wrapperClass: string;
};
export declare class BusyConfig implements IBusyConfig {
template: string;
delay: number;
Expand All @@ -21,11 +29,3 @@ export interface IBusyConfig {
wrapperClass?: string;
busy?: Promise<any> | Subscription | Array<Promise<any> | Subscription>;
}
export declare const BUSY_CONFIG_DEFAULTS: {
template: string;
delay: number;
minDuration: number;
backdrop: boolean;
message: string;
wrapperClass: string;
};
27 changes: 14 additions & 13 deletions build/busy-config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/busy-config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/busy-config.metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"__symbolic":"module","version":3,"metadata":{"BusyConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}]}},"IBusyConfig":{"__symbolic":"interface"},"BUSY_CONFIG_DEFAULTS":{"template":"\n <div class=\"ng-busy-default-wrapper\">\n <div class=\"ng-busy-default-sign\">\n <div class=\"ng-busy-default-spinner\">\n <div class=\"bar1\"></div>\n <div class=\"bar2\"></div>\n <div class=\"bar3\"></div>\n <div class=\"bar4\"></div>\n <div class=\"bar5\"></div>\n <div class=\"bar6\"></div>\n <div class=\"bar7\"></div>\n <div class=\"bar8\"></div>\n <div class=\"bar9\"></div>\n <div class=\"bar10\"></div>\n <div class=\"bar11\"></div>\n <div class=\"bar12\"></div>\n </div>\n <div class=\"ng-busy-default-text\">{{message}}</div>\n </div>\n </div>\n ","delay":0,"minDuration":0,"backdrop":true,"message":"Please wait...","wrapperClass":"ng-busy"}}},{"__symbolic":"module","version":1,"metadata":{"BusyConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}]}},"IBusyConfig":{"__symbolic":"interface"},"BUSY_CONFIG_DEFAULTS":{"template":"\n <div class=\"ng-busy-default-wrapper\">\n <div class=\"ng-busy-default-sign\">\n <div class=\"ng-busy-default-spinner\">\n <div class=\"bar1\"></div>\n <div class=\"bar2\"></div>\n <div class=\"bar3\"></div>\n <div class=\"bar4\"></div>\n <div class=\"bar5\"></div>\n <div class=\"bar6\"></div>\n <div class=\"bar7\"></div>\n <div class=\"bar8\"></div>\n <div class=\"bar9\"></div>\n <div class=\"bar10\"></div>\n <div class=\"bar11\"></div>\n <div class=\"bar12\"></div>\n </div>\n <div class=\"ng-busy-default-text\">{{message}}</div>\n </div>\n </div>\n ","delay":0,"minDuration":0,"backdrop":true,"message":"Please wait...","wrapperClass":"ng-busy"}}}]
[{"__symbolic":"module","version":3,"metadata":{"BUSY_CONFIG_DEFAULTS":{"template":"\n <div class=\"ng-busy-default-wrapper\">\n <div class=\"ng-busy-default-sign\">\n <div class=\"ng-busy-default-spinner\">\n <div class=\"bar1\"></div>\n <div class=\"bar2\"></div>\n <div class=\"bar3\"></div>\n <div class=\"bar4\"></div>\n <div class=\"bar5\"></div>\n <div class=\"bar6\"></div>\n <div class=\"bar7\"></div>\n <div class=\"bar8\"></div>\n <div class=\"bar9\"></div>\n <div class=\"bar10\"></div>\n <div class=\"bar11\"></div>\n <div class=\"bar12\"></div>\n </div>\n <div class=\"ng-busy-default-text\">{{message}}</div>\n </div>\n </div> \n ","delay":0,"minDuration":0,"backdrop":true,"message":"Please wait...","wrapperClass":"ng-busy"},"BusyConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}]}},"IBusyConfig":{"__symbolic":"interface"}}},{"__symbolic":"module","version":1,"metadata":{"BUSY_CONFIG_DEFAULTS":{"template":"\n <div class=\"ng-busy-default-wrapper\">\n <div class=\"ng-busy-default-sign\">\n <div class=\"ng-busy-default-spinner\">\n <div class=\"bar1\"></div>\n <div class=\"bar2\"></div>\n <div class=\"bar3\"></div>\n <div class=\"bar4\"></div>\n <div class=\"bar5\"></div>\n <div class=\"bar6\"></div>\n <div class=\"bar7\"></div>\n <div class=\"bar8\"></div>\n <div class=\"bar9\"></div>\n <div class=\"bar10\"></div>\n <div class=\"bar11\"></div>\n <div class=\"bar12\"></div>\n </div>\n <div class=\"ng-busy-default-text\">{{message}}</div>\n </div>\n </div> \n ","delay":0,"minDuration":0,"backdrop":true,"message":"Please wait...","wrapperClass":"ng-busy"},"BusyConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}]}},"IBusyConfig":{"__symbolic":"interface"}}}]
Loading