64 Commits

Author SHA1 Message Date
19f3bb23fd feat: export TransitionOptions interface and getIonPageElement (#28140)
Issue number: resolves #28137

---------

Changes according to [this
comment](https://github.com/ionic-team/ionic-framework/issues/28137#issuecomment-1710283096)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

@liamdebeasi Sorry for replacing the previous PR. I only copied the main
branch to my fork so I couldn't rebase properly. I am unfortunately not
extremely familiar with Github.

---------

Co-authored-by: Philipp Heuer <philipp@studysmarter.de>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-09-11 08:53:56 -04:00
e6c7bb60e7 feat(checkbox, radio, toggle, range): stacked labels for form controls (#28075)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2023-09-01 09:30:59 -07:00
77707b8c1e fix(angular): min/max validator for ion-input type number (#27993)
Issue number: Resolves #23480

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Angular's min/max validators do not work with `ion-input[type=number]`.
Using the built-in validators with `ion-input` will not update the
control status to invalid, reflect the `ng-invalid` class or report the
correct errors.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The `IonicModule` now includes two additional directive declarations
that extend Angular's built-in min/max validators and target the
`ion-input` component when using `type="number"`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-08-18 18:34:02 +00:00
bbfb8f81a6 fix(angular): ionTabsWillChange is fired before tab activation (#27991)
Issue number: Resolves #27212

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

`ionTabsWillChange` emits _after_ the tab view is activated in the
stack.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `ionTabsWillChange` emits _before_ the tab view is activated in the
stack.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev-build: `7.2.4-dev.11692040948.1fd0ecd2`
2023-08-18 15:07:09 +00:00
90f41243d9 feat(angular): support binding routing data to component inputs (#27694)
Issue number: Resolves #27476

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Ionic Angular application on Angular v16 cannot use the
[`bindToComponentInputs`](https://angular.io/api/router/ExtraOptions#bindToComponentInputs)
feature to assign route parameters, query parameters, route data and
route resolve data to component inputs.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Ionic Angular developers can use the option on `RouterModule.forRoot`
to enable the Angular feature for binding the route snapshot data to the
component inputs.

**Modules**
```ts
@NgModule({
  imports: [
    RouterModule.forRoot([/* your routes */], { 
      bindToComponentInputs: true // <-- enable this feature
    })
  ]
})
export class AppModule { }
```

**Standalone**

```ts
import { withComponentInputBinding } from '@angular/router';

bootstrapApplication(App, {
  providers: [
    provideRouter(routes, 
      //... other features
      withComponentInputBinding() // <-- enable this feature
    )
  ],
});
```

With this feature enabled, developers can bind route parameters, query
parameters, route data and the returned value from a resolver to input
bindings on their component.

For example, with a route configuration of:
```ts
RouterModule.forChild([
  {
    path: ':id',
    data: {
      title: 'Hello world'
    },
    resolve: {
      name: () => 'Resolved name'
    },
    loadComponent: () => import('./example-component/example.component').then(c => c.ExampleComponent)
  }
])
```
and a component configuration of:

```ts
@Component({ }) 
export class ExampleComponent {
  @Input() id?: string;
  @Input() title?: string;
  @Input() name?: string;
  @Input() query?: string;
}
```

Navigating to the component with a url of: `/2?query=searchphrase`

The following would occur:
- `id` would return `2`
- `title` would return `Hello world`
- `name` would return `Resolved name`
- `query` would return `searchphrase`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

This PR will need to be targeted to a minor release once a design doc is
approved by the team.

Dev-build: `7.1.3-dev.11689276547.129acb40`
2023-07-18 16:26:37 -04:00
71310372c9 feat(searchbar): add name property (#27737)
resolves #27675
2023-07-17 11:43:00 -04:00
32bc33ed28 refactor(angular): move to packages directory (#27719)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The `angular` directory sits at the root of the project instead of in
`packages` with all the other JS Framework integrations. This does not
cause any functional issues with Ionic, but it is confusing since
integrations are not in a consistent place.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Moves the `angular` directory to `packages/angular`

Note: Most files should remain unchanged. The only files I changed are
the files that had direct paths to the old `angular` directory:

1. Removes the `angular` path in `lerna.json`. This is now covered by
`packages/*`
2. Updated the angular file path in `.gitignore`
3. Updates the path to the angular package in `stencil.config.ts` for
the Angular Output Targets
4. Updates some of Angular's sync scripts to correctly get the core
stylesheets as well as the core package.
5. Updates the test app sync script to correctly sync core and
angular-server

~I'm not entirely sure why GitHub thinks
https://github.com/ionic-team/ionic-framework/pull/27719/files#diff-f5bba7e7c7c75426e2b9c89868310cb03890493b4efe0252adf8d12cc8398962
is a new file since it exists in `main` here:
1f06be4a31/angular/test/base/scripts/build-ionic.sh~
Fixed in
6e7fc49827

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev build: `7.1.2-dev.11688052109.13454f5c`
2023-07-05 17:52:35 +00:00
d37623a2ca chore(packages): move the packages to root 2018-03-12 16:02:25 -04:00
851aa838fa refactor(router): init ng router refactor 2018-03-06 19:57:45 -06:00
a1f942d45e chore(cleanup): remove unused code 2018-03-06 19:56:53 -06:00
4ec3e488ea fix(zone): forgot to remove console.logs 2018-03-04 16:08:30 +01:00
aa91d11726 fix(testing): do not throw error for missing Ionic global 2018-03-04 07:29:16 -06:00
8b605bf2d2 chore(): update to latest stencil 2018-03-03 16:11:52 +01:00
7366c38abc perf(events): bypass ngzone 2018-03-02 22:56:39 -06:00
756dc6e306 refactor(events): remove Events feat from core 2018-03-02 14:52:34 -06:00
79eddec369 fix(events): fix ionic/angular events 2018-03-01 16:32:29 -06:00
9c93df48d8 style(lint): fix lint errors 2018-03-01 16:21:06 -06:00
c3362fecd5 fix(angular): move module sensitive controllers out of forRoot() 2018-02-28 11:46:17 -06:00
6c1056b9cb feature(platform): implement a web component that provides access to a small subset of platform information 2018-02-19 14:19:42 -06:00
cc59a4e1fb feat(value-accessors): set ionic classes 2018-02-16 17:33:00 -06:00
3f6e1ddbcd refactor(external-router): remove the external router controller, move the reconciliation methods to the nav itself, and move the external activation status information to ion-app 2018-02-15 23:14:09 -06:00
4524d59e46 refactor(angular): remove reflective injector and use static injector instead 2018-02-15 16:27:38 -06:00
8ec8b43408 refactor(router): monkey patch the router instead of extending it 2018-02-15 16:27:38 -06:00
8c8b8548e7 feature(angular): nav-params integrate with router 2018-02-13 15:05:20 -06:00
4271a0fc1e feature(routing): create external router controller for reconciling state from router in re-useable fashion
* external router controller

* external router controller

* gif it's working
2018-02-13 01:28:39 -06:00
edeb1324c9 refactor(nav): implement nav integration with external router (angular to start) 2018-02-13 00:02:48 -06:00
255c3dd1ae refactor(all): componentOnReady is part of the types 2018-02-10 01:52:51 +01:00
9226684826 perf(virtual-scroll): reduce DOM writes 2018-02-09 17:22:37 +01:00
73ce15f7da refactor(router): separate nav and router-outlet into two seperate directives 2018-02-06 00:50:00 -06:00
97baabde93 chore(routing): update routing package 2018-02-06 00:13:41 -06:00
40f9cd5ece fix(valueAccessors): add disabled state handling 2018-02-02 17:06:17 -06:00
0babb2ece2 fix(virtual-scroll): working in angular 2018-02-01 23:39:46 +01:00
41ccdd52a6 feat(range): hookup the ion-range with a custom value accessor 2018-01-31 12:11:13 -06:00
547a3464ba chore(): revert back to our custom ng router package for now 2018-01-31 11:17:57 -06:00
ab2176b6ce refactor(nav): add initial support for url in general, add integration w/ ng-router 2018-01-31 10:52:50 -06:00
caca8ef864 feature(menu): add menuToggle directive 2018-01-09 15:49:48 -06:00
135d6b6e78 refactor(value-accessors): add searchbar 2018-01-09 15:09:36 -06:00
a0121dd3bc refactor(delegate): don't wrap in ion-page 2018-01-09 13:22:24 -06:00
a15f9dfdc6 refactor(): add menu-controller, make updates to modal and nav controllers 2018-01-09 00:07:03 -06:00
61713ffba5 fix(modal-controller): fix order of params 2018-01-08 13:38:46 -06:00
adf65fbf0d refactor(modal): add dismiss api 2018-01-08 13:29:10 -06:00
e64944d6de refactor(framework-delegate): wrap user element with ion-page for modal and nav 2018-01-04 13:04:19 -06:00
3604adf841 refactor(angular): optionally wrap the user's template in 2018-01-04 13:04:19 -06:00
b54ff41501 refactor(angular): change how angular mounts a component, use the angular selector if possible 2018-01-04 13:04:19 -06:00
c3598ab69a fix(di): fix ionic/angular di bug 2017-12-22 23:58:14 -06:00
6995af6027 feature(nav-params): add navs params injectable 2017-12-22 23:24:38 -06:00
a0688886d9 feature(events): add events api to angular package 2017-12-22 14:53:35 -06:00
1ba73a5f29 refactor(popover): get popover working with dom, react, angular components 2017-12-14 16:22:40 -06:00
ec33d4e725 refactor(modal): use framework delegate for mounting the user's component 2017-12-14 15:13:47 -06:00
c30337bf8c refactor(navigation): get rid of ion-nav-controller, get nav working correctly in DOM, angular, react 2017-12-14 15:13:47 -06:00