30秒学会 Angular 片段 – Reusing code in template
While the best way of reusing your code is creating a component, it’s also possible to do it i...
While the best way of reusing your code is creating a component, it’s also possible to do it i...
Checks if the given argument is a string. Only works for string primitives. Use typeof to check if a...
Returns true if the given string is a palindrome, false otherwise. Convert the string to String.prot...
Maps the values of a list using a function, where the key-value pairs consist of the value as the ke...
Checks if a string is upper case. Convert the given string to upper case, using string.ToUpper() and...
Returns the memoized (cached) function. Create an empty cache by instantiating a new array. Return a...
Iterates over all own properties of an object, running a callback for each one. Use Object.keys(obj)...
Returns true if the user color scheme preference is dark, false otherwise. Use window.matchMedia() w...
Flattens a list, by spreading its elements into a new list. Loop over elements, use list.extend() if...
Tests a value, x, against a predicate function, conditionally applying a function. Check if the valu...