style: clang-format the code
This commit is contained in:
parent
b4db73d0bf
commit
c8baf51f4f
|
@ -503,9 +503,10 @@ function _parseMessageMeta(i18n: string): {meaning: string, description: string,
|
|||
|
||||
const idIndex = i18n.indexOf(ID_SEPARATOR);
|
||||
const descIndex = i18n.indexOf(MEANING_SEPARATOR);
|
||||
const [meaningAndDesc, id] = (idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] :
|
||||
[i18n, ''];
|
||||
const [meaning, description] = (descIndex > -1) ? [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :
|
||||
const [meaningAndDesc, id] =
|
||||
(idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''];
|
||||
const [meaning, description] = (descIndex > -1) ?
|
||||
[meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :
|
||||
['', meaningAndDesc];
|
||||
|
||||
return {meaning, description, id};
|
||||
|
|
|
@ -29,6 +29,6 @@ navigate to [http://localhost:8001](http://localhost:8001)
|
|||
./modules/@angular/examples/test.sh
|
||||
```
|
||||
|
||||
NOTE: sometimes the http server does not exits properly and it retans the `8001` port.
|
||||
NOTE: sometimes the http server does not exit properly and it retains the `8001` port.
|
||||
in such a case you can use `lsof -i:8001` to see which process it is and then use `kill`
|
||||
to remove it. (Or in single command: `lsof -i:8001 -t | xargs kill`)
|
|
@ -186,7 +186,8 @@ describe('plugin', () => {
|
|||
expectSemanticError('app/ng-if-cases.ts', locationMarker, message);
|
||||
}
|
||||
it('should report an implicit context reference', () => {
|
||||
expectError('implicit', "The template context does not defined a member called 'unknown'");
|
||||
expectError(
|
||||
'implicit', 'The template context does not defined a member called \'unknown\'');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import {ActivatedRoute} from './router_state';
|
||||
import {PRIMARY_OUTLET, Params} from './shared';
|
||||
import {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';
|
||||
import {forEach, shallowEqual, last} from './utils/collection';
|
||||
import {forEach, last, shallowEqual} from './utils/collection';
|
||||
|
||||
export function createUrlTree(
|
||||
route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,
|
||||
|
@ -29,8 +29,7 @@ export function createUrlTree(
|
|||
const segmentGroup = startingPosition.processChildren ?
|
||||
updateSegmentGroupChildren(
|
||||
startingPosition.segmentGroup, startingPosition.index, nav.commands) :
|
||||
updateSegmentGroup(
|
||||
startingPosition.segmentGroup, startingPosition.index, nav.commands);
|
||||
updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);
|
||||
return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);
|
||||
}
|
||||
|
||||
|
@ -65,7 +64,8 @@ function replaceSegment(
|
|||
}
|
||||
|
||||
class Navigation {
|
||||
constructor(public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {
|
||||
constructor(
|
||||
public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {
|
||||
if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
|
||||
throw new Error('Root segment cannot have matrix parameters');
|
||||
}
|
||||
|
@ -148,8 +148,8 @@ function findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRo
|
|||
|
||||
const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;
|
||||
const index = route.snapshot._lastPathIndex + modifier;
|
||||
return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);
|
||||
|
||||
return createPositionApplyingDoubleDots(
|
||||
route.snapshot._urlSegment, index, nav.numberOfDoubleDots);
|
||||
}
|
||||
|
||||
function createPositionApplyingDoubleDots(
|
||||
|
|
Loading…
Reference in New Issue