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

discontinued
outdated

Core library for AngularDart. 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 factory providing the top-level services.
@GenerateInjector([
  ValueProvider.forToken(appConfig, <String, dynamic>{'name': 'Core Library for AngularDart'}),
  ValueProvider.forToken(appEnv, 'production')
])
final InjectorFactory createInjector = self.createInjector$Injector; // ignore: prefer_const_declarations

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

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

  /// The configuration service.
  final Configuration config;

  /// Method invoked 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. Provides essential services for any Angular-based application.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

angular, angular_router, biscuits

More

Packages that depend on ngx_core