Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(deeplinking.ngdoc): correct and enhance deep linking demo #4191

Closed
wants to merge 934 commits into from

Conversation

jamesdaily
Copy link
Contributor

Correct "#/" linking
Implement ability to add and remove contacts
Use semantic tags
Include working e2e tests

Closes #3870

@mary-poppins
Copy link

Thanks for the PR!

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@jamesdaily
Copy link
Contributor Author

@btford Here's another attempt, this time with passing tests.

Replaces #4146

@btford
Copy link
Contributor

btford commented Oct 1, 2013

In the future, please updating existing PRs rather than create new ones.

@btford btford closed this Oct 3, 2013
@btford btford reopened this Oct 3, 2013
@petebacondarwin
Copy link
Contributor

@jamesdaily - this doesn't seem to be working locally when I build it. The routes don't seem to change and the formatting seems a bit wrong in the live demo.
As @btford says, we don't even have a link to the cookbook at the moment, do we? Whether it will continue is up in the air. So perhaps we are better off focussing our efforts elsewhere for now? I am going to put this in the post-1.2 milestone to be looked at again later.

image

@jamesdaily
Copy link
Contributor Author

@petebacondarwin No objections here - happy to focus elsewhere. The example worked when hosted locally inside a seed app, and in plunker, but it looks like I need to revisit my local build testing to see why it breaks as a live demo.

Regarding cookbook visibility: while there's no menu link to the cookbook, you can still find it in a search engine - including from the AngularJS home page's "search this site" box. https://www.google.com/search?q=angular+hello+world brings up the cookbook as the second result, for example.

So you might consider hiding cookbook pages from search engines until they can be shored up.

@caitp
Copy link
Contributor

caitp commented Jan 19, 2014

Hey, these are actually failing a lot of e2e tests in modern angular... do you want to rebase and try to fix it up? That would be awesome (also, all of the things pete said still stand, but given that I don't necessarily have an issue with it if it gets cleaned up)

I can paste the log for you

Running "tests:end2end" (tests) task
WARN [config]: "/" is proxied, you should probably change urlRoot to avoid conflicts
INFO [karma]: Karma v0.11.12 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 32.0.1700 (Mac OS X 10.9.1)]: Connected on socket hOuhOAXTbHEU75uEavEV with id 48868872
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should change the view to welcome.html by default when user visits the root FAILED
    expect element '.partial-info' html toContain "welcome.html"
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1938:9: expected element '.partial-info' html toContain "welcome.html" but was ""
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should change the view to welcome.html when user clicks the Welcome nav link FAILED
    expect element '.partial-info' html toContain "welcome.html"
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1943:9: expected element '.partial-info' html toContain "welcome.html" but was ""
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should welcome the user by name FAILED
    element '[ng-view] h2' html
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1948:15: Selector [ng-view] h2 did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should change the view to settings.html when user clicks the Settings nav link FAILED
    expect element 'small.partial-info' html toContain "settings.html"
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1953:9: expected element 'small.partial-info' html toContain "settings.html" but was ""
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should preserve the original name upon canceling a name change FAILED
    element '[ng-view] h2' html
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1958:16: Selector [ng-view] h2 did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should discard the change when Reset is clicked FAILED
    element '[ng-view] h2' html
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1966:16: Selector [ng-view] h2 did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jqlite cookbook/deeplinking should save an updated name FAILED
    input 'form.name' enter 'yourname'
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:1976:9: Selector [ng\:model="form.name"] did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should change the view to welcome.html by default when user visits the root FAILED
    expect element '.partial-info' html toContain "welcome.html"
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4914:9: expected element '.partial-info' html toContain "welcome.html" but was ""
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should change the view to welcome.html when user clicks the Welcome nav link FAILED
    expect element '.partial-info' html toContain "welcome.html"
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4919:9: expected element '.partial-info' html toContain "welcome.html" but was ""
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should welcome the user by name FAILED
    element '[ng-view] h2' html
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4924:15: Selector [ng-view] h2 did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should change the view to settings.html when user clicks the Settings nav link FAILED
    expect element 'small.partial-info' html toContain "settings.html"
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4929:9: expected element 'small.partial-info' html toContain "settings.html" but was ""
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should preserve the original name upon canceling a name change FAILED
    element '[ng-view] h2' html
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4934:16: Selector [ng-view] h2 did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should discard the change when Reset is clicked FAILED
    element '[ng-view] h2' html
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4942:16: Selector [ng-view] h2 did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1) angular+jquery cookbook/deeplinking should save an updated name FAILED
    input 'form.name' enter 'yourname'
    /Users/caitp/git/angular.js/build/docs/docs-scenario.js:4952:9: Selector [ng\:model="form.name"] did not match any elements.
Chrome 32.0.1700 (Mac OS X 10.9.1): Executed 250 of 250 (14 FAILED) (2 mins 1.277 secs / 1 min 56.839 secs)

...however, what brian says is true, there's no link to the cookbook currently, so it might be a wasted effort to clean this up

joscha and others added 22 commits January 26, 2014 22:10
…mmits

Instead of using fix() or chore() when labelling a commit which improves
speed or performance use perf(). Perf commits will be listed in the
CHANGELOG under "Performance Improvements".

For example:
perf($animate): cache all getComputedStyle operations to reduce additional reflows
Change position of <a> and <li> tags in tutorial nav buttons
partial. This allows the full area of the button to be clicked
rather than just the text.

Closes angular#5074
Closes angular#5209
Putting route parameter examples in braces was misleading newcomers.

Closes angular#5243
Fix the broken build and earn a late (french spelling).
Just my first pass at a more readable format of the guide index.

Note: the styles apply to all content in the docs, not just the guide
index. This is intentional and I feel that the result is positive.
The labels are set by a script and
should not be set manually any more.
Instead of parallelization on a single Travis VM, we use two VMs.
- output is nicer (we don't have to buffer e2e tests and then show it at the end)
- you can easily see faster the result of unit tests (as it's basically a separate build)

We should also make sure we only do the necesary stuff (for install we don't need to do `grunt
package` for unit tests, we only need to generate the docs for e2e tests.
Refactoring so that it's easier to use both SL/BS just depending on a global switch.
Copy mock data returned from the mock $httpBackend.
This prevents modifications to the response from affecting future responses.
Previously, this misbehavior was being mitigated by the deep copy in $resource, but that no longer exists.
The url paths in the tutorial are not in line with the actual tutorial code

Closes angular#5264
When a component uses an isolate scope reference
and the the component is used with an object literal
a new object is created on every evaluation.
Therefore the compiler needs to compare
the values of the parent and the isolate scope
using object equality and not object reference
equality.

Fixes angular#5296.
matsko and others added 27 commits January 26, 2014 22:12
- referring to `=attr` rather than `=prop` is consistent with note under example with =customerInfo
- change `prop` to `attr` (basically `prop` refers to property in JS object, `attr` is for HTML tag)
- change the function name in description to match the name in code example

Closes angular#5786
This issue has been a focus of problems for some users and we discussed it on the IRC that it should
be at least documented.

~Amended the style to use bootstrap notes, I think overall it looks better and catches the eyes more
easily. However there are no anchor links to these, if these are necessary they can be added later.

Closes angular#3436
Closes angular#5762
Code uses module names with '2' as suffix while the explanation used the module names without the
suffix. The diagram is correct but also does not suffix the module names.

Closes angular#5567
Amended to also clarify this note in the mac/linux tab.

Closes angular#5845
This always throws me off - I think it helps to make it clear that the class name is arbitrary, and
what matters is the .ng-etc classes.

Closes angular#5848
Correction misspelling: easist -> easiest

Closes angular#5850
Lets encourage people to use semicolons in javascript :>

Closes angular#5834
The ng-change event triggers immediately, which makes a difference for text input fields and text
areas, where the JavaScript onchange event would only be called at the end of the change.

Closes angular#5640
Include mention of `ngSanitize` (and add it to the example), as well as removing (and clarifying if
needed) references to `ng-html-bind-unsafe`.

Closes angular#5551
Extend the example with ng-value showing how to deal with default checked radio boxes.

Closes angular#5654
The main api docs page is probably the main landing page for many devs
looking to learn angular, so linking to the main guide pages would
likely help.

Closes angular#5869
Originally, this issue was regarding documenting `restrict: 'CM'` in the directive guide, but it
was pointed out that the restrict documentation is covered in the $compile documentation. Because of
this, a link was simply added to the $compile documentation.

However, the wording suggests that it's actually linking to the directive registration function, in
$compileProvider, so the docs will link there instead. There is a link only a paragraph below to the
$compile documentation, so this does not hurt.

Closes angular#5516
The $log provider returns an object and not a function, so this example, which appears to be using
the $log provider, should call it as it would be called in a real-world application.

Closes angular#5875
Clears up expression priority issue

Closes angular#3869
Closes angular#5873
… directive

As discussed in comments on angular@42ec95e#commitcomment-5109829,
ngInit is not an element directive, so @clkao's example should reflect this.

Closes angular#5879
…xample

the function okToGreet wasn't defined, so this example wouldn't work properly.

I've decided that instead of adding unrelated code to the example, it should just be noted that the
function is expected to be defined in the lexical scope.

Closes angular#5878
Indentation made Markdown parser think that it’s a block of code.

Closes angular#5446
This removes some outdated advice which no longer is true against the latest angular version.

The information about unit testing with ngMocks remains, because it's always good to have
information like that easily found. This little snippet is not worded perfectly, and is not
a very good example unit test, so additional work is needed here.

Relates to angular#5206
Closes angular#5485
The general assumption is that if @priority is not defined, the priority is 0. BUT it's not
necessarily harmful to be explicit about this.

Closes angular#5852
@jamesdaily
Copy link
Contributor Author

Well, messed that up... looking into how to fix this now.

@linclark
Copy link
Contributor

Based on the comments above regarding there not being a link to the cookbook anyway and the lack of recent activity, I'm going to close this out.

@linclark linclark closed this Mar 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.