DevExtreme Angular - Utils API
applyChanges(data, changes, options)
Array<any>
Array<any>
Name | Type | Description |
---|---|---|
immutable |
If |
|
keyExpr | | |
Specifies the key property (or properties) that provide(s) keys to locate data items. Default value: "id" |
Array<any>
base64_encode(input)
Encodes a string or array of bytes in Base64.
compileGetter(expr)
The DataSource and stores use this method internally - you do not need to use it directly. Refer to Getters and Setters for more information.
compileSetter(expr)
The DataSource and stores use this method internally - you do not need to use it directly. Refer to Getters and Setters for more information.
errorHandler
Use the setErrorHandler instead.
odata.keyConverters
Contains built-in OData type converters (for String, Int32, Int64, Boolean, Single, Decimal, and Guid) and allows you to register a custom type converter.
The following code shows how to register a custom type converter:
- import { keyConverters } from "devextreme/data/odata/utils";
- // ...
- export class AppComponent {
- constructor () {
- keyConverters["MyType"] = value => {
- return value + "MT"
- }
- }
- }
See Also
query(array, queryOptions)
Creates a Query instance.
- import Query from "devextreme/data/query";
- // ...
- export class AppComponent {
- constructor () {
- let query = Query([10, 20, 50, 40, 30]);
- };
- }
See Also
query(url, queryOptions)
Creates a Query instance that accesses a remote data service using its URL.
The queryOptions object should contain the adapter function that implements data access logic. The queryOptions object can also contain the errorHandler function for handling errors that may occur during the Query's execution.
- import Query from "devextreme/data/query";
- // ...
- export class AppComponent {
- constructor () {
- let query = Query("http://mydomain.com/MyDataService", queryOptions);
- };
- }
See Also
setErrorHandler
A method that specifies a function to be executed when a Data Layer component throws an error.
- import { setErrorHandler } from "data/errors";
- setErrorHandler(function(error) {
- console.log(error.message);
- });
See Also
If you have technical questions, please create a support ticket in the DevExpress Support Center.