ngx_core 0.11.0 copy "ngx_core: ^0.11.0" to clipboard
ngx_core: ^0.11.0 copied to clipboard

discontinued
outdated

Core library for AngularDart applications. Provides essential services for any Angular-based application.

example/main.dart

import 'package:angular/angular.dart';
import 'package:ngx_core/ngx_core.dart';

// ignore: uri_has_not_been_generated
import 'main.template.dart' as self;

/// The injector providing the top-level services.
@GenerateInjector([
  ValueProvider.forToken(configToken, <String, dynamic>{'name': 'Core library for AngularDart'}),
  ValueProvider.forToken(envToken, 'production')
])
final InjectorFactory rootInjector = self.rootInjector$Injector;

/// A component that demonstrates the usage of the [Configuration] service.
@Component(
  selector: 'configuration-demo',
  providers: [ngxModule],
  template: '<div></div>'
)
class ConfigurationDemoComponent implements OnInit {

  /// Creates a new demo component.
  ConfigurationDemoComponent(this.config);

  /// The configuration service.
  final Configuration config;

  /// Method called after the first change-detection completed.
  @override
  void ngOnInit() {
    print(config.keys); // ["name"]
    print(config['name']); // "Core library for AngularDart"

    config['foo'] = 'bar';
    print(config.keys); // ["name", "foo"]
    print(config['foo']); // "bar"
  }
}
0
likes
0
pub points
0%
popularity

Publisher

verified publisherbelin.io

Core library for AngularDart applications. Provides essential services for any Angular-based application.

Homepage

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

angular, angular_router, biscuits

More

Packages that depend on ngx_core